其他分享
首页 > 其他分享> > poj 2959(水题,注意是直径和球球之间距离)

poj 2959(水题,注意是直径和球球之间距离)

作者:互联网

#include<iostream>
#include<cmath>
using namespace std;
#define PI 3.14159265
int main(){
    double D,d,s;
    int n,result;
    scanf("%d",&n);
    while(n--){
        scanf("%lf%lf%lf",&D,&d,&s);
        result = floor(PI/(PI/2-acos((d+s)/(D-d))));
        printf("%d\n",result);
    }
    return 0;
}

 

标签:lf%,include,水题,球球,scanf,int,poj,result,PI
来源: https://www.cnblogs.com/stevenzrx/p/15620824.html