2621 Land Erosion
time limit: 1 sspace limit: 32000 KBtitle level: Golden Gold SolvingView Run ResultsTitle Description
Description
Fred was thinking about buying some land on the American Louisiana to build his house. In his investigation of the land, he found that Louisiana shrank 50 square miles every year as a result of Mississippi R. erosion. Since Fred intends to spend the rest of his life here, he needs to know if his land will be eroded.
After doing some research, Fred found that the land here was eroded in a semicircular form. This semicircle is a part of a circle, the center of the Circle (0,0), divided by the horizontal axis, the axis of the x axis below the part in the water. The area before the beginning of the first year of the semicircle is 0.
Enter a description
Input Description
One line, with two spaces separated by a number of x, Y, means Fred buys the coordinates of the land used to build the house. These coordinates are floating point types, in miles units and y-coordinates are non-negative and do not appear (0,0).
Output description
Output Description
An integer that represents the year in which Fred's residence began to be eroded.
Sample input
Sample Input
3.0 4.0
Sample output
Sample Output
1
Data range and Tips
Data Size & Hint
(1) The point (x, y) cannot be just on the semicircular boundary; (2) to ensure that your answer is exactly the same as the test data, π=3.141592654 Pi
Category labels
Tags Click here to expand
Water ~ ~
#include <cstdio>Double x, y; int Main () { scanf ("%lf%lf",&x,&y); printf ("%d", (int) ((x*x+y*y) *3.141592654/100 +1)); return 0 ;}
2621 Land Erosion