| ||||||||||
| 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:请大牛帮我找找错!!我两次Wrong Answer了!!!谢谢!!!In Reply To:请大牛帮我找找错!!我两次Wrong Answer了!!!谢谢!!! Posted by:2006011320 at 2007-02-21 20:58:31 > #include<iostream>
> #include<iomanip>
> #include<cmath>
> using namespace std;
> int main()
> {
> double R[1000],r; int n[1000],i;
> const double pi=3.14159265358979323846264338327950288;
> int N;
> cin>>N;
> for(i=1;i<=N;i++)cin>>R[i]>>n[i];
> for(i=1;i<=N;i++)
> {
> r=(1-1/(1+sin(pi/n[i])))*R[i];
> cout<<"Scenario #"<<i<<":"<<endl;
> cout<<setiosflags(ios::fixed)<<setprecision(3);
> cout<<r<<endl;
> cout<<endl;
> }
> return 1;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator