can you check my answer

https://www.codechef.com/viewsolution/20428842
why am i getting error

#HERE is your accepted solution…

Small bug on line 31