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 原因WHY!WA 的!@ #include<iostream.h> #include<stdio.h> #include<math.h> void main(){ int number,n; double R,r,temp; double re[10000]; cin>>number; for(int i=1;i<=number;i++){ cin>>R>>n; r=(sin(acos(-1)/n)*R)/(1+sin(acos(-1)/n)); re[i]=r; } for(i=1;i<=number;i++){ //printf("Scenario #%d:\n",i); cout<< "Scenario #"<<i<<":"<<endl; printf("%.3f\n\n",re[i]); } } AC 的!@ #include<iostream.h> #include<stdio.h> //#define pi 3.14159265358979323846 #include<math.h> void main(){ int number,n; double R,r,temp; double re[10000]; cin>>number; for(int i=1;i<=number;i++){ cin>>R>>n; r=(sin(acos(-1)/n)*R)/(1+sin(acos(-1)/n)); re[i]=r; } for(i=1;i<=number;i++){ printf("Scenario #%d:\n",i); //cout<< "Scenario #"<<i<<":"<<endl; printf("%.3f\n\n",re[i]); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator