#P6546. Snail Climb
Snail Climb
Snail Climb
A snail is trying to climb a tree stump of height \(v\) meters. During the day, it climbs up \(a\) meters, but at night, it slips down \(b\) meters. Determine the minimum number of days required for the snail to reach the top of the stump.
Note: If the snail reaches or exceeds the height \(v\) during the daytime, it will not slip down at night.
inputFormat
The input consists of three positive integers \(v\), \(a\), and \(b\) separated by spaces, where:
- \(v\) is the height of the tree stump in meters.
- \(a\) is the meters the snail can climb during the day.
- \(b\) is the meters the snail slides down at night.
outputFormat
Output a single integer representing the minimum number of days the snail needs to reach the top.
sample
10 3 15