結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-06-20 15:50:00 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 191 bytes |
| コンパイル時間 | 1,017 ms |
| コンパイル使用メモリ | 80,272 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-20 15:50:03 |
| 合計ジャッジ時間 | 2,756 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:9:16: warning: 'amount' may be used uninitialized [-Wmaybe-uninitialized]
9 | amount += i;
| ~~~~~~~^~~~
main.cpp:5:11: note: 'amount' was declared here
5 | int N,amount;
| ^~~~~~
ソースコード
#include <iostream>
int main()
{
int N,amount;
std::cin >> N;
for (int i = 1; i <= N; i++)
{
amount += i;
}
std::cout << amount << std::endl;
return 0;
}