結果
| 問題 |
No.369 足し間違い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-14 20:14:52 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 197 bytes |
| コンパイル時間 | 1,602 ms |
| コンパイル使用メモリ | 79,244 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-14 20:14:55 |
| 合計ジャッジ時間 | 1,230 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 5 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:9:26: warning: 'n' is used uninitialized [-Wuninitialized]
9 | for(int i = 0; i < n; i++) {
| ~~^~~
main.cpp:7:13: note: 'n' was declared here
7 | int n;
| ^
ソースコード
#include <iostream>
using namespace std;
int main() {
int n;
long int sum = 0;
for(int i = 0; i < n; i++) {
int a;
cin >> a;
sum += a;
}
int yu;
cin >> yu;
cout << sum - yu;
}