結果
問題 |
No.143 豆
|
ユーザー |
![]() |
提出日時 | 2020-08-03 09:30:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 810 ms |
コンパイル使用メモリ | 91,864 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 11:33:48 |
合計ジャッジ時間 | 1,381 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <iomanip> #include <stack> #include <algorithm> #include <string> #include <map> #include <iterator> #include <set> #include <queue> using namespace std; int main() { int K, N, F; cin >> K >> N >> F; int s = K * N; for (int i = 0; i < F; ++i) { int A; cin >> A; s -= A; } if (s < 0) { cout << -1 << endl; } else { cout << s << endl; } return 0; }