| CodeRams Practice Problem Archive |
|---|
| Finished |
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.
The 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.
Output a single positive integer w: how far you will have to walk to retrieve the hovercraft.
10 6
14.0
14 13
18.196152422706632
| Name |
|---|


