| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
哪错?怎么老是WA#include <math.h>
#define pi 3.141592654
int main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
float x,y,r,s,year;
scanf("%f%f",&x,&y);
r=hypot(x,y);
s=0.5*pi*r*r;
s=ceil(s);
year=ceil(s/50);
printf("Property %d: This property will begin eroding in year %.0f.\n",i+1,year);
}
printf("END OF OUTPUT.\n");
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator