Codechef Judge giving wrong answer

I was trying to solve this easy problem: CodeChef: Practical coding for everyone

So i made a solution and submitted it, getting a WA. Tried doing some things differently but still WA.

So i saw one of the solution, but it doing almost exactly what i was doing. So tried again still WA.

So finally out of frustration, i submitted the code that was earlier accepted and that gave WA.

Idk what i am missing, here are the link to both the submissions:
Accepted: CodeChef: Practical coding for everyone
WA : CodeChef: Practical coding for everyone

Your solution is wrong.
Try case

1
1
1

It seems the test cases were weak at the time of the contest, but this case was added later at practice section.