Homer Simpson
Easy
Execution time limit is 2 seconds
Runtime memory usage limit is 64 megabytes
Homer Simpson, a very smart guy, likes eating Krusty-burgers. It takes Homer M minutes to eat a Krusty-burger. However, theres a new type of burger in Apus Kwik-e-Mart. Homer likes those too. It takes him N minutes to eat one of these burgers. Given T minutes, you have to find out the maximum number of burgers Homer can eat without wasting any time. If he must waste time, he can have beer.
Input
Each test case consists of three integers M, N, T (1 ≤ M, N, T ≤ 1 000 000).
Output
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.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 16%