hdu_5858_Hard problem(数学题)

题目链接:hdu_5858_Hard problem

题意:

让你求阴影部分面积

题解:

推推公式就行

 1 #include<stdio.h>
 2 #include<math.h>
 3 #define PI 3.1415926535897932384626433832795
 4 int main()
 5 {
 6     double a=1.0/8.0*PI-1.0/8.0*acos(3.0/4.0)-0.5*acos(9.0/16.0)+sqrt(7.0)/8.0;
 7     int t,l;
 8     scanf("%d",&t);
 9     while(t--)
10     {
11         scanf("%d",&l);
12         printf("%0.2lf
",2.0*l*l*a);
13     }
14 }
View Code
原文地址:https://www.cnblogs.com/bin-gege/p/5785136.html