Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:用G++报WA,后将double换成 long double仍WA,无奈,试了一下C++,竟AC了,无语。。。

Posted by jiyanmoyu at 2009-08-12 20:09:11 on Problem 1799
In Reply To:用G++报WA,后将double换成 long double仍WA,无奈,试了一下C++,竟AC了,无语。。。 Posted by:jiyanmoyu at 2009-08-12 20:08:44
代码

#include<stdio.h>
#include<math.h>
const long double PI=acos(-1.0);
int main()
{
    int t,i,n;
    long double R,m;
    scanf("%d",&t);
    for(i=1;i<=t;++i)
    {
        scanf("%Lf%d",&R,&n);
        m=sin(PI/n);
        printf("Scenario #%d:\n%.3Lf\n\n",i,m*R/(1.0+m));
    }
    return 0;
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator