Submit | All submissions | Best solutions | Back to list |
EISNAIL - SNAIL |
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
Example
Input: 2 1 5 Output: 4 Input: 5 1 6 Output: 2 Input: 100 99 1000000000 Output: 999999901
Added by: | Ha Minh Ngoc |
Date: | 2019-10-14 |
Time limit: | 0.300s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | CSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG FSHARP GO JAVA JS-MONKEY NODEJS PHP PYTHON PYPY PYPY3 PYTHON3 RUBY SQLITE SWIFT VB.NET |