結果
| 問題 | No.480 合計 |
| コンテスト | |
| ユーザー |
kurante5
|
| 提出日時 | 2021-03-14 15:25:39 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 198 bytes |
| コンパイル時間 | 641 ms |
| コンパイル使用メモリ | 63,048 KB |
| 実行使用メモリ | 16,968 KB |
| 最終ジャッジ日時 | 2024-11-06 05:18:43 |
| 合計ジャッジ時間 | 7,002 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 21 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:14:13: warning: 'sum' may be used uninitialized [-Wmaybe-uninitialized]
14 | cout << sum << endl;
| ^~~
main.cpp:10:9: note: 'sum' was declared here
10 | int sum;
| ^~~
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
int N;
cin >> N;
int i = 1;
int sum;
while (i <= N) {
sum += i;
}
cout << sum << endl;
}
kurante5