結果

問題 No.143 豆
ユーザー marimom7
提出日時 2015-10-09 11:36:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 53,852 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-20 02:22:02
合計ジャッジ時間 907 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 16 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

int main(){

	int K,N,F;
	int age = 0;
	int num = 0;

	cin >> K >> N >> F;

	num = K*N;

	for(int i = 0; i < F; i++){
		cin >> age;
		num += -age;
	}

	cout << (num > 0 ? num : -1) << endl;

	return 0;
}
0