今天是ZOJ-1049-I Think I Need a Houseboat。
简单。
#include <stdio.h>
#include <math.h>
#define PI 3.1415926535
int main()
{
int N,i,j=1;
float x,y;
scanf("%d",&N);
while(N--)
{
int S=0,r=0;
scanf("%f %f",&x,&y);
for(i=0;x*x+y*y>r*r;i++)
{
r=sqrt(2*S/PI);
S+=50;
}
printf("Property %d: This property will begin eroding in year %d.\n",j,i-1);
j++;
}
printf("END OF OUTPUT.\n");
return 0;
}