游客 Signup | Login
中文 | En

3427 - 土地测量-2012蓝桥杯试题

 
<p>
	各条边长数据如下:
</p>
<p>
	&nbsp; &nbsp;AB = 52.1
</p>
<p>
	&nbsp; &nbsp;BC = 57.2
</p>
<p>
	&nbsp; &nbsp;CD = 43.5
</p>
<p>
	&nbsp; &nbsp;DE = 51.9
</p>
<p>
	&nbsp; &nbsp;EA = 33.4
</p>
<p>
	&nbsp; &nbsp;EB = 68.2
</p>
<p>
	&nbsp; &nbsp;EC = 71.9
</p>
<p>
	&nbsp; &nbsp;根据这些数据求五边形地块的面积并输出。四舍五入到小数后两位。
</p>
<p>
	&nbsp; (比赛原题为结果填空题)&nbsp;
</p>
<p>
	<br />
</p>

Input

Output

Examples

Input


                

Output


                

Solution C

#include<stdio.h>
int main()
{
	printf("%.2f\n",3789.86);
	return 0;
}

Solution C++

#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
double area(double a,double b,double c)
{
	double s=(a+b+c)/2;
	return sqrt(s*(s-a)*(s-b)*(s-c));
}
int main()
{
	double sum=0;
	sum+=area(52.1,33.4,68.2);
	sum+=area(68.2,57.2,71.9);
	sum+=area(71.9,43.5,51.9);
	cout<<fixed<<setprecision(2)<<sum;
	return 0;
}

Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题