WA in HP18

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

can anyone tell why it is not working?