結果
| 問題 |
No.9008 空白区切りで与えられる数値データの合計値を求める(テスト用)
|
| ユーザー |
|
| 提出日時 | 2023-04-22 21:42:06 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 188 bytes |
| コンパイル時間 | 759 ms |
| コンパイル使用メモリ | 65,708 KB |
| 最終ジャッジ日時 | 2025-02-12 13:13:22 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 15 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:9:13: warning: ‘out’ may be used uninitialized [-Wmaybe-uninitialized]
9 | out += a;
| ~~~~^~~~
main.cpp:6:9: note: ‘out’ was declared here
6 | int out,a;
| ^~~
ソースコード
#include<iostream>
using namespace std;
int main() {
int N;
cin >> N;
int out,a;
for(int i=0;i<N;i++) {
cin >> a;
out += a;
}
cout << out << endl;
}