Where does my solution fail?

Which case is my solution failing in? Can’t seem to figure this one out

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

//