Boating

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Boating

Goal
Known that there is a boat rowing on a river and the river isn't static, also, the boat need to back
and forth for one times.

Calculate the average speed of the boat

Input
Line 1: The full distance between the start and end.

Line 2: The speed of the boat.

Line 3: The speed of the river.

Note that the given distance is in metres and the speed is in metres/minutes

Output
Line 1: The average speed of the boat back and forth rounded to 3 digits.

Constraints
No constraints.

Example
Input

100
30
20

Output

8.333

You might also like