結果
問題 |
No.480 合計
|
ユーザー |
|
提出日時 | 2022-12-12 17:10:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 164 bytes |
コンパイル時間 | 494 ms |
コンパイル使用メモリ | 66,888 KB |
最終ジャッジ日時 | 2025-02-09 10:18:16 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }