|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
某梯形的上底、下底和高分别为x,y,z,求该梯形的面积s。
(梯形面积=(上底+下底)*高/2)
输入格式:
只一行:三个数x 、y、 z,之间分别有1个空格分开
输出格式:
只有一个数s,
样例1:
输入:
3 6 7
输出:
31.5
样例2:
输入:
4 6 7
输出:
35
|
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1453 |
|
其它 |
通过 |
76人 |
提交 |
298次 |
通过率 |
26% |
难度 |
0 |
|
|
|
|
|
|