http://162.105.81.212/JudgeOnline/problem?id=1005 double floor(double x); double ceil(double x); floor(x)返回的是小于或等于x的最大整数.如: floor(10.5) = 10 floor(-10.5) = -11ceil(x)返回的是大于或等于x的最小整数.如: ceil(10.5) = 11 ceil(-10.5) =-10 #include<stdio.h> #include<math.h> int main() { int t,id=1; double x,y,ans,pi=acos(-1.0);; scanf("%d",&t); while(t--) { scanf("%lf%lf",&x,&y); ans=pi*(x*x+y*y)/100; printf("Property %d: This property will begin eroding in year %.0lf./n",id++,ceil(ans)); } puts("END OF OUTPUT."); return 0; }