結果
問題 |
No.143 豆
|
ユーザー |
|
提出日時 | 2020-03-31 20:20:06 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 396 bytes |
コンパイル時間 | 675 ms |
コンパイル使用メモリ | 118,016 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 11:28:35 |
合計ジャッジ時間 | 1,291 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
ソースコード
#include <iostream> void solve() { int k, n; std::cin >> k >> n; int ans = k * n; int m; std::cin >> m; while (m--) { int a; std::cin >> a; ans -= a; } std::cout << std::max(ans, -1) << std::endl; } int main() { std::cin.tie(nullptr); std::cout.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }