Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 52274 Accepted: 214

  本题非常简单,就是求第n年的时候半径r>sqrt(x*x+y*y);

代码:

 

1 #include<stdio.h>
2 #include<math.h>
3  #define pr acos(-1.0) //这个我也是听别人说的,一定要记得
4  int main()
5 {
6 int n,m;double r1,r2,x,y;
7 while(scanf("%d",&n)!=EOF)
8 {
9 int i;
10 for(i=1;i<=n;i++)
11 {
12 scanf("%lf%lf",&x,&y);
13 r2=0;
14 r1=x*x+y*y;
15 m=0;
16 while(r2<r1)
17 {
18 m++;
19 r2=m*50*2/pr;
20 }
21 printf("Property %d: This property will begin eroding in year %d.\n",i,m);
22 }
23 printf("END OF OUTPUT.\n");
24 }
25 return 0;
26 }
27
28
29