Can anyone tell me what is the problem with my solution

https://www.codechef.com/viewsolution/25405662