标签:style blog class code c tar
题意:求一个正方形中不被其内接圆覆盖的面积。已知其内接圆半径。
1 //Accepted 1088 KB 0 ms 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 const double Pi=2*acos(0.0); 6 double ans,r; 7 double slove() 8 { 9 return 4*r*r-Pi*r*r; 10 } 11 int main() 12 { 13 int T; 14 scanf("%d",&T); 15 for (int t=1;t<=T;t++) 16 { 17 scanf("%lf",&r); 18 printf("Case %d: %.2f\n",t,slove()+1e-9); 19 } 20 return 0; 21 }
lightoj1022Circle in Square,布布扣,bubuko.com
标签:style blog class code c tar
原文地址:http://www.cnblogs.com/djingjing/p/3734481.html