I am solving [this][1] problem.
This is my solution :
[2]
For every case I could make, it gives correct answer. But on submission I get wrong answer.
Please help what's wrong in the code. For which cases does the code go wrong?
[1]: http://www.codechef.com/problems/A1
[2]: http://www.codechef.com/viewsolution/3659472