#P6546. [COCI 2010/2011 #2] PUŽ
[COCI 2010/2011 #2] PUŽ
Description
Snail climbing a well problem: A snail needs to climb to the top of a tree stump that is meters high. Every day, it climbs up meters during the day, and slips down meters at night. After how many days can it reach the top of the stump?
Input Format
One line with three integers , , and , separated by spaces.
Output Format
One line with one integer, the answer.
2 1 5
4
5 1 6
2
100 99 1000000000
999999901
Hint
Constraints
For of the testdata, it is guaranteed that .
Notes
- This problem is worth points in total.
- Translated from COCI2010-2011 CONTEST #2 PUŽ. Translator: https://www.luogu.com.cn/user/115711
Hint
Please derive the formula for the result. A simple simulation may cause TLE.
Translated by ChatGPT 5
京公网安备 11011102002149号