Two squares with sides of length 1 are given. The intersection between the two squares determines an area whose surface is equal to k.
Task
Determine the maximum distance between two vertices of the two squares.
Input data
Input file patrate.in contains on the first line the real number k.
Output data
Output file patrate.out will contain a single line with a real number with 10 decimals, which will represent the maximum distance between two vertices of the two squares.
Constraints
The number in the output file will
be considered correct if the absolute value of the difference between your result
and the correct result is < 0.000000001.
Example
patrate.in | patrate.out |
1 |
1.4142135624 |
Time limit: 0.1 seconds/test
prof. Radu Jugureanu
Bucharest "Cantemir-Voda" National High-School
Contact:radu.jugureanu@siveco.ro