Easy Geo
Time Limit: 1 sec
The Problem
Circles C1 and C2 have equal radius and are tangent to that same line L. Circle C3 is tangent to C1 and C2. x is the distance between the between the centers of C1 and C2. Find the distance h, from the center of C3 to line L, in terms of x and the radius of the three circles.
The Input
There are several lines of input. Each line contains 3 integers R (1 ≤ R ≤ 1000), R3 (1 ≤ R3 ≤ 1000), x (2 ≤ x ≤ 4000) where R is the radius of C1 and C2, R3 radius of C3, and x is the distance between center of C1 and C2. Input terminated by EOF. All inputs are valid.
The Output
For each line of input, print the value of h with exactly two decimal digits in a single line.
Sample Input
3 2 7
2 3 9
Sample Output
6.57
4.18
Intra University Programming Contest - Winter 2019 [BGC Trust University Bangladesh]
Problem Setter: Shahin ShamS