1 条题解
-
0
C :
#include <stdio.h> void main() { int a,b,h; double s; scanf("%d %d %d",&a,&b,&h); s=(a+b)*h/2.0; printf("%.1f\n",s); }
C++ :
#include<bits/stdc++.h> using namespace std; int main(){ float a,b,h; cin>>a>>b>>h; cout<<fixed<<setprecision(1)<<(a+b)*h/2<<endl; return 0; }
Python :
a,b,h=map(int,input().split()) s=(a+b)*h/2 print('%.1f'% s)
- 1
信息
- ID
- 2249
- 时间
- 1000ms
- 内存
- 16MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者