1 条题解

  • 0
    @ 2024-2-4 15:00:12

    根据小学梯形面积公式S=0.5(a+b)hS=0.5*(a+b)*h可以写出代码。

    AC Code

    #include <bits/stdc++.h>
    using namespace std;
    
    int a, b, h;
    int main() {
         cin >> a >> b >> h;
         cout << 0.5 * (a + b) * h;
         return 0;
    }
    
    • 1

    信息

    ID
    410
    时间
    2000ms
    内存
    256MiB
    难度
    1
    标签
    (无)
    递交数
    8
    已通过
    6
    上传者