why wrong answer??

http://www.codechef.com/viewsolution/6491238

for the problem