http://www.codechef.com/problems/POUR1
this is a question i found while solving problems from pratice arena on codechef. I saw many solutions but could not understand the logic. On some of the posts i found that DIOPHANTUS has given the solution for this, but could not get any relevant material. Further, the editorial of this question is not provided. please help me in understanding this problem.