这里需要一些公式
以上的图来自与博客http://www.cnblogs.com/inmoonlight/p/5788081.html
|∂|所对的圆心角的弧度数的绝对值,R是扇形半径。
然后弧长L=|∂|*R
扇形的面积为二分之一的对应的弧长乘半径
S=(L*R)/2
已知三角形的 三边求面积,可以用秦九韶公式
还有余弦公式
所以
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int l;
scanf("%d",&l);
double ans=(double)4*l*l*(acos(sqrt(2.0)/4)/8-(acos(5.0*sqrt(2.0)/8)/2)+sqrt(7.0)/16);
printf("%.2f\n",ans);
}
return 0;
}