문제
Farmer John owes Bessie gallons of milk (). He has to give her the milk within days. However, he doesn't want to give the milk away too quickly. On the other hand, he has to make forward progress on the loan, so he must give Bessie at least gallons of milk each day ().
Here is how Farmer John decides to pay back Bessie. He first picks a positive integer . He then repeats the following procedure every day:
Assuming that Farmer John has already given Bessie gallons, compute rounded down. Call this number .If is less than , set to . Give Bessie gallons of milk.
Determine the largest such that if Farmer John follows the above procedure, Farmer John gives Bessie at least gallons of milk after days ().
SCORING:
Test cases 2-4 satisfy Test cases 5-11 satisfy no additional constraints.
입력
The only line of input contains three space-separated positive integers , , and satisfying .
출력
Output the largest positive integer such that Farmer John will give Bessie at least gallons using the above procedure.
예제 입력 1
10 3 3
예제 출력 1
2
코드를 제출하려면 로그인이 필요합니다.
로그인