結果

問題 No.369 足し間違い
ユーザー kurenai3110kurenai3110
提出日時 2016-05-24 17:59:05
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 184 bytes
コンパイル時間 579 ms
コンパイル使用メモリ 55,336 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-16 12:20:13
合計ジャッジ時間 1,164 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:23: warning: ‘baka’ is used uninitialized [-Wuninitialized]
   16 |         cout << sum - baka << endl;
      |                       ^~~~

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
	int n,sum=0,x,baka;

	cin >> n;

	for(int i=0;i<n;i++){
		cin >> x;

		sum += x;
	}

	cout << sum - baka << endl;

	return 0;
}
0