| ||||||||||
| 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:到底是什么错啊??有高手能告诉我吗??谢谢啊In Reply To:到底是什么错啊??有高手能告诉我吗??谢谢啊 Posted by:smilezhen at 2005-08-19 14:16:22 > #include <iostream.h>
> #include <stdio.h>
> #include<math.h>
>
> void main(){
> int t, n, i;
> long double R, PI, k;
> PI = acos(-1);
> cin>>t;
> for(i=1; i<=t;++i){
> cin>>R>>n;
> cout<<"Scenario #"<<i<<":"<<endl;
> k = PI/n;
> k = (sin(k) + sin(PI-k))/2;
> k = k/(1+k);
> if(n==2) printf("%.3llf\n\n",R/2);
> else printf("%.3llf\n\n",R*k);
> }
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator