結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-09-16 19:29:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 194 bytes |
| コンパイル時間 | 685 ms |
| コンパイル使用メモリ | 63,104 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-16 19:29:40 |
| 合計ジャッジ時間 | 1,416 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:10:13: warning: 'sum' may be used uninitialized [-Wmaybe-uninitialized]
10 | cout << sum << endl;
| ^~~
main.cpp:5:11: note: 'sum' was declared here
5 | int a,sum;
| ^~~
ソースコード
#include <iostream>
using namespace std;
int main(void){
// Your code here!
int a,sum;
cin >> a;
for(int i = 1; i <= a; i++) {
sum += i;
}
cout << sum << endl;
}