結果
| 問題 | No.480 合計 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-12 17:08:35 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 164 bytes |
| 記録 | |
| コンパイル時間 | 347 ms |
| コンパイル使用メモリ | 77,880 KB |
| 実行使用メモリ | 12,020 KB |
| 最終ジャッジ日時 | 2026-06-28 21:44:22 |
| 合計ジャッジ時間 | 1,328 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 22 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:8:9: warning: 'ans' may be used uninitialized [-Wmaybe-uninitialized]
8 | ans = ans + n;
| ~~~~^~~~~~~~~
main.cpp:5:9: note: 'ans' was declared here
5 | int N,ans;
| ^~~
ソースコード
#include <iostream>
using namespace std;
int main () {
int N,ans;
cin >> N;
for (int n = 0;n < N;n ++) {
ans = ans + n;
}
cout << ans ;
return 0;
}