結果
| 問題 |
No.480 合計
|
| コンテスト | |
| ユーザー |
test
|
| 提出日時 | 2017-05-07 17:31:29 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 435 bytes |
| コンパイル時間 | 478 ms |
| コンパイル使用メモリ | 56,028 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-14 09:23:43 |
| 合計ジャッジ時間 | 1,221 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 22 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:19:11: warning: ‘b’ may be used uninitialized in this function [-Wmaybe-uninitialized]
19 | cout << b << endl;
| ^
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
int a, b;
string s;
// 標準入力から、空白や改行で区切られた整数と文字列を読み込む。
// cin >> a >> b >> s;
cin >> a;
// 整数と文字列を空白で区切って、標準出力に書き出す。
// cout << a + b << " " << s << endl;
for(int i=1;i <= a;i++){
b = b + i;
}
cout << b << endl;
return 0;
}
test