Hunting Dog
Time limit1sMemory limit1024 MB
Given the starting gap N and per-jump distances M (rabbit) and K (dog), the task is to find how many jumps the dog needs to close the gap.
- Level
Easy1 of 10
- Topics
- Math, Simulation
- Solved
- No attempts yet
Problem
A hunting dog is N steps behind a running rabbit. Write a program dog that computes after how many jumps the hunting dog will catch the running rabbit, if on each jump the rabbit covers M steps and the dog covers K steps.
Input
The first line of standard input contains three positive integers N, M, and K.
Output
Print to standard output, on a single line, one integer: the number of jumps the hunting dog must make to catch the running rabbit.
Constraints
, , .