結果
| 問題 | No.369 足し間違い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-04 22:34:30 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 340 bytes |
| 記録 | |
| コンパイル時間 | 398 ms |
| コンパイル使用メモリ | 78,464 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-09 08:25:48 |
| 合計ジャッジ時間 | 1,288 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <iostream>
void solve() {
int n;
std::cin >> n;
int s = 0;
while (n--) {
int a;
std::cin >> a;
s += a;
}
int x;
std::cin >> x;
std::cout << s - x << std::endl;
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}