Submission #40590626
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, h; // 「a」「b」「h」という3つの変数を宣言
cin >> a >> b >> h; // まとめて入力を受け取る
cout << (a+b)*h/2 << endl; // 計算結果を出力
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Trapezoids |
| User | rurun |
| Language | C++ (GCC 9.2.1) |
| Score | 100 |
| Code Size | 253 Byte |
| Status | AC |
| Exec Time | 6 ms |
| Memory | 3592 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt |
| All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, sample_01.txt, sample_02.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01.txt | AC | 3 ms | 3416 KiB |
| 02.txt | AC | 3 ms | 3536 KiB |
| 03.txt | AC | 6 ms | 3592 KiB |
| 04.txt | AC | 2 ms | 3524 KiB |
| 05.txt | AC | 2 ms | 3592 KiB |
| sample_01.txt | AC | 2 ms | 3548 KiB |
| sample_02.txt | AC | 2 ms | 3564 KiB |