Hide

Problem E
Flying Straight

A galloping horse travels at a constant speed on the Earth’s surface. However, because of the Earth’s curvature, the horse does not travel in a straight line in 3D space. Old Man Joe has a really special horse, named Joey, that can fly, but only in a straight line in 3D space. Old Man Joe wants to know how far apart Joey would be from a normal horse that gallops on Earth’s surface if they were to race for some time. Both horses start the race at the same location and start galloping/flying in the same direction (in particular, Joey flies in a straight line tangent to the Earth’s surface).

We will assume Earth is a stationary sphere with a radius of 6378137 meters.

Input

There is a single line of input containing three space-separated integers $F$, $G$, $T$, the speed of the flying horse in m/s, the speed of the galloping horse in m/s, and the number of seconds the race lasts, respectively. The numbers are such that $1\leq F, G \leq 10^{6}$, $1\leq T\leq 10^{8}$.

Output

Output the distance, in meters, between the two horses at the end of the race within $10^{-6}$ absolute or relative error.

Sample Input 1 Sample Output 1
1 1 1000
0.0783927968013984
Sample Input 2 Sample Output 2
19 20 300
300.0123889317558

Please log in to submit a solution to this problem

Log in