#K74017. Meeting Point of Vehicles
Meeting Point of Vehicles
Meeting Point of Vehicles
Two vehicles are moving in the same direction. Vehicle A starts at position \(0\) and vehicle B starts at position \(x\). Their speeds are \(v_a\) and \(v_b\) respectively. They will meet if and only if \(v_a > v_b\). In that case, the meeting time is given by \(t = \frac{x}{v_a - v_b}\) and the meeting position is \(v_a \times t = \frac{v_a \times x}{v_a - v_b}\). Otherwise, if \(v_a \leq v_b\), they will never meet.
Examples:
- For input
10 2 1
, the meeting position is20
. - For input
5 1 2
, the output isNEVER
.
inputFormat
The input consists of three space-separated integers: (x), (v_a), and (v_b). (x) represents the starting position of vehicle B, while (v_a) and (v_b) represent the speeds of vehicles A and B respectively.
outputFormat
Output the position where vehicle A meets vehicle B. If vehicle A can never catch up with vehicle B (i.e., if (v_a \leq v_b)), print "NEVER".## sample
5 1 2
NEVER