結果
問題 |
No.143 豆
|
ユーザー |
|
提出日時 | 2020-05-18 21:55:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 312 bytes |
コンパイル時間 | 1,500 ms |
コンパイル使用メモリ | 166,164 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 22:06:44 |
合計ジャッジ時間 | 2,338 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 1 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" int main() { int k, n, f; cin >> k >> n >> f; int sum = k * n; for (int i = 0; i < f; ++i) { int a; cin >> a; sum -= a; } cout << ((sum > 0) ? sum : -1) << endl; return 0; }