WA in problem "Fit to Play"

,

https://www.codechef.com/viewsolution/15533422. What is wrong with this solution of mine for Fit to Play?(PRACTICE EASY QUESTION)

No answer :(.

The link is not valid I guess .

//