LCC/Moose '19 Contest 1 J2 - A Car Problem

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 0.3s
Memory limit: 128M

Author:
Problem type

You and your friend are in different towns and want to meet somewhere in between.

The two of you are N km apart and your car is X kilometers per hour faster than your friend's car.

If it takes you T hours to reach each other, how fast is your car?

Input Specification

The first line will contain one integer, N (0 \le N \le 10^9), the distance between the two towns.

The second line will contain one integers, X (0 \le X \le 10^9), how much faster your car is than your friend's car in km/h.

The third line will contain one integer, T (1 \le T \le 10^9), the time it takes for you to meet each other.

Output Specification

On the first line, output the speed of your (faster) car in km/h. Your answer will be considered correct if it has an absolute or relative error of at most 10^{-6}.

Sample Input 1

200
20
2

Sample Output 1

60

Sample Input 2

1000
7
3

Sample Output 2

170.16666666666666

Comments

There are no comments at the moment.