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<stdio.h> #include<math.h> int main() { int t,i; int m=1; scanf("%d",&t); for(i=0;i<t;i++) { float R,n,r; scanf("%f%f",&R,&n); if(n==1) break; if(n==2) { r=R/2.0; printf("Scenario #%d:\n",m); printf("%.3f\n\n",r); } if(n>2) { float pi=acos(-1.0); float x,y; x=cos(2.0*pi/n); y=sqrt(2.0/(1-x)); r=R/(1.0+y); printf("Scenario #%d:\n",m); printf("%.3f",r); } if(m<t) printf("\n\n"); m++; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator