eolymp
bolt
Try our new interface for solving problems
Problems

Average train speed

Average train speed

Find the average speed of the train, if it traveled the first half of the distance at a speed of $v_1$, and the second half at a speed of $v_2$. \InputFile Two integers $v_1$ and $v_2~(1 \le v_1, v_2 \le 10^9)$. \OutputFile Print the average speed of the train with $4$ decimal places.
Time limit 1 second
Memory limit 128 MiB
Input example #1
10 10
Output example #1
10.0000
Input example #2
50 100
Output example #2
66.6667