Is This Integration ? UVA - 10209(计算几何)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/leekerian/article/details/87554367
#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
 
const double pi=acos(-1);
 
int main(){
    double a;
    while(cin>>a){
        double z=a*a-pi*a*a/6.0-sqrt(3)/4.0*a*a;
        double y=a*a-pi*a*a/4.0-2.0*z;
        double x=a*a-4.0*y-4.0*z;
        printf("%.3lf %.3lf %.3lf\n",x,4*y,4*z);
    }
    return 0;
}

猜你喜欢

转载自blog.csdn.net/leekerian/article/details/87554367