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 |
Re:小菜鸟的AC纪念。。。如有不足恳请指正In Reply To:小菜鸟的AC纪念。。。如有不足恳请指正 Posted by:KAYY at 2019-02-12 15:00:17 > #include<stdio.h> > int main() > { > int n,i,j,b[20]; > double a[20][2],r2,pi=3.1415; > scanf("%d",&n); > for(i=0;i<n;i++) > scanf("%lf%lf",&a[i][0],&a[i][1]); > > > for(i=0;i<n;i++) > { > r2=a[i][0]*a[i][0]+a[i][1]*a[i][1]; > for(j=0;;j++) > if(j*50*2>pi*r2) > { > b[i]=j;break; > } > printf("Property %d: This property will begin eroding in year %d.\n",i+1,j); > } > printf("END OF OUTPUT."); > return 0; > } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator