首页 > 其他 > 详细

poj 1799(水题)

时间:2021-07-30 15:47:59      阅读:23      评论:0      收藏:0      [点我收藏+]
#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
#define PI 3.1415927
int main(){
    int t,n;
    double R,tmp;
    scanf("%d",&t);
    for(int i=1;i<=t;i++){
        scanf("%lf%d",&R,&n);
        printf("Scenario #%d:\n",i);
        tmp = cos((n-2)*1.0*PI/2/n); 
        printf("%.3lf\n\n",tmp*R/(1+tmp));
    }
    return 0;
}

 

poj 1799(水题)

原文:https://www.cnblogs.com/stevenzrx/p/15079544.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!