P6546 [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 $v$ meters high. Every day, it climbs up $a$ meters during the day, and slips down $b$ meters at night. After how many days can it reach the top of the stump?
Input Format
One line with three integers $a$, $b$, and $v$, separated by spaces.
Output Format
One line with one integer, the answer.
Explanation/Hint
#### Constraints
For $100\%$ of the testdata, it is guaranteed that $1 \leq b < a \leq v \leq 1 \times 10^9$.
#### Notes
- This problem is worth $30$ points in total.
- Translated from [COCI2010-2011](https://hsin.hr/coci/archive/2010_2011/) [CONTEST #2](https://hsin.hr/coci/archive/2010_2011/contest2_tasks.pdf) PUŽ. Translator: @[mnesia](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