
Homer Simpson, a very smart guy, likes eating Krusty-burgers. It takes
Homer
Input Specification
Input consists of several test cases (up to 10). Each test case consists of three integers
Output Specification
For each test case, print in a single line the maximum number of burgers Homer can eat without having beer. If Homer must have beer, then also print the time he gets for drinking, separated by a single space. It is preferable that Homer drinks as little beer as possible.
Sample Input
3 5 54
3 5 55
Sample Output
18
17
(Note that this problem is sourced from UVa.)
Comments