407050: GYM102697 021 Hovercraft
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
021. Hovercrafttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
While testing your hovercraft for Science Olympiad, the hovercraft flew over a pile of boxes in your basement and traveled a total distance of n feet. Given that the boxes are in a rectangular shape, and that the hovercraft took off and landed at opposite corners of the pile of boxes, calculate how far you will have to walk to pick up the hovercraft. You are also given the length of one side of the pile of boxes.
InputThe first line of input contains a single positive integer n: how far the hovercraft traveled in feet. The second line of input contains a single positive integer m: the length of one side of the file of boxes.
OutputOutput a single positive integer w: how far you will have to walk to retrieve the hovercraft.
ExamplesInput10 6Output
14.0Input
14 13Output
18.196152422706632