Crossed Ladders
Execution time limit is 1 second
Runtime memory usage limit is 122.174 megabytes
A narrow street is lined with tall buildings. An x foot long ladder is rested at the base of the building on the right side of the street and leans on the building on the left side. An y foot long ladder is rested at the base of the building on the left side of the street and leans on the building on the right side. The point where the two ladders cross is exactly c feet from the ground. How wide is the street?
Input
Each line contains three positive real numbers giving the values of x, y and c.
Output
For each test case print one line with a real number giving the width of the street in feet, with three digits after the decimal point.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 48%