結果
問題 |
No.480 合計
|
ユーザー |
|
提出日時 | 2018-04-18 17:22:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 184 bytes |
コンパイル時間 | 546 ms |
コンパイル使用メモリ | 64,504 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 04:30:47 |
合計ジャッジ時間 | 1,209 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:13:13: warning: 'sum' may be used uninitialized [-Wmaybe-uninitialized] 13 | cout << sum << endl; | ^~~ main.cpp:6:12: note: 'sum' was declared here 6 | int N, sum; | ^~~
ソースコード
#include<iostream> using namespace std; int main(){ int N, sum; cin >> N; for(int i = 1; i <= N; i++){ sum += i; } cout << sum << endl; return 0; }