Gửi bài giải
Điểm:
1,00 (OI)
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Input:
stdin
Output:
stdout
Nguồn bài:
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
There is a snail on the ground. It wants to climb to the top of a wooden pillar with a height of V meters from the ground. In a day, it can climb up A meters. However, every night it sleeps and drops B meters. Determine the number of days needed for a snail to reach the top.
Input
Three integers separated by spaces: A, B and V (1≤B <A≤V≤1 000 000 000).
Output
A single integer is the number of days
Sample Input
2 1 5
Sample Output
4
Sample Input
5 1 6
Sample Output
2
Sample Input
100 99 1000000000
Sample Output
999999901
Bình luận