printРабочее место участника

printЗадачи

2215. Straggler

Ограничения: время – 500ms/1000ms, память – 256MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод copy
Послать решение Blockly Посылки Темы Где Обсудить (0)

Tim develops the news site iMoto about motorsports. In motorsports it is very common that the leader pilot in a race, at a certain moment, overtakes the last pilot. The leader, at this moment, is one lap ahead of the last pilot, who then becomes a straggler. For article about race results, Tim has to calculate in which lap the slowest pilot will become a straggler, if known the time it takes for the fastest pilot, and for the slowest pilot, to complete one lap. Shall consider that, at the beginning, they are side by side at the start line of the circuit, both at the start of lap number 1 (the first lap of the race); and that a new lap always begins right after the leader crosses the start line.
Input
First line contains two integers `X` and `Y` (`1\ ≤\ X\ <\ Y\ ≤\ 10000`), the times, in seconds, that it takes for the fastest and the slowest pilot, respectively, to complete one lap.
Output
Program should output line, containing one integer: the lap in which the slowest pilot will become a straggler.

Sample Input #1

1 10

Sample Output #1

2

Sample Input #2

4 8

Sample Output #2

2

Sample Input #3

5 7

Sample Output #3

4
loading