poj1799

简单题

View Code
#include <iostream>
#include
<cstdlib>
#include
<cstring>
#include
<cstdio>
#include
<cmath>
using namespace std;

int main()
{
//freopen("D:\\t.txt", "r", stdin);
int t;
scanf(
"%d", &t);
for (int i = 0; i < t; i++)
{
double r;
int n;
scanf(
"%lf%d", &r, &n);
printf(
"Scenario #%d:\n%.3f\n\n", i + 1, (1 - 1 / (1 + sin(3.1415926 / n))) * r);
}
return 0;
}
posted @ 2011-04-08 19:25  金海峰  阅读(210)  评论(0编辑  收藏  举报