Cooling pies help!

here’s my code:
http://www.codechef.com/viewsolution/4132385

please tell me what’s wrong with this? it’s working in my compiler.