| ||||||||||
| 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 | |||||||||
公式水过啊 几何推导 注意sin里面是PI/m 例如sin(π/3)的感觉
#include<iostream>//我自己推出来的哦
#include<stdio.h>
#include<cmath>
using namespace std;
#define PI 3.1415926535
int main()
{
int n,m,count=0;
double r1,r2;
cin>>n;
while(n--)
{
count++;
cin>>r1>>m;
r2=r1*sin(PI/m)/(1.0+sin(PI/m));
printf("Scenario #%d:\n%.3f\n\n",count,r2);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator