The length of the Moscow Ring Road — 109 kilometers. Biker Vasya starts from the zero kilometer of the Moscow Ring Road and rides at a speed of v
kilometers per hour. Where will it stop in t
hours?
It is forbidden to use any algorithmic constructs to solve this problem.
Only arithmetic operations can be used (no built-in functions)
Input
The program receives the value v
and t
as input. If v
> 0, then Vasya moves in the positive direction along the Moscow Ring Road, but if the value v
< 0, then in the negative. (It is guaranteed that the original numbers are integers and are between -1000 and +1000).
Output
The program should output an integer from 0 to 108 — the number of the mark where Vasya will stop.
Examples
# |
Input |
Output |
1 |
60
2 |
11 |
2 |
-1
1 |
108 |
Запрещенные операторы:if;for;while;do;max