#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
int n,i,*p;
double x,y,distance,r;
scanf("%d",&n);
p = (int*)malloc(sizeof(int)*n);
for(i = 0;i<n;i++)
{ scanf("%lf %lf",&x,&y);
distance = sqrt(x*x + y*y);
r = 0;
p[i] = 0;
while(distance>r){
p[i]++;
r = sqrt(50.0*p[i]*2/3.1415);
}
}
for(i = 0;i<n;i++)
{
printf("Property %d: This property will begin eroding in year %d.\n",i + 1,p[i]);
}
printf("END OF OUTPUT.\n");
return 0;
}
ZOJ1149
最新推荐文章于 2022-05-03 19:30:00 发布