UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#170296#1125. 求梯形的面积luojianwei22161000ms1288kbC++217b2023-04-01 21:22:572023-04-01 21:22:59

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
	double a, b, h, area = 0.0;
	scanf("%lf%lf%lf", &a, &b, &h);
	area = (a + b) * h * 1.0 / 2;
	cout << fixed << setprecision(2) << area;
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 50
Accepted
time: 0ms
memory: 1288kb

input:

3 5 4

output:

16.00

result:

ok single line: '16.00'

Test #2:

score: 50
Accepted
time: 0ms
memory: 1288kb

input:

6 3 7

output:

31.50

result:

ok single line: '31.50'