結果
問題 |
No.143 豆
|
ユーザー |
![]() |
提出日時 | 2022-12-13 12:09:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 1,831 ms |
コンパイル使用メモリ | 190,588 KB |
最終ジャッジ日時 | 2025-02-09 10:53:11 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 |
ソースコード
#include <bits/stdc++.h> using namespace std; int k,n,f,a,tot; int main(){ // freopen("aa.in","r",stdin); // freopen("aa.out","w",stdout); cin>>k>>n>>f; for(int i=0;i<f;++i){ cin>>a; tot+=a; } if(k*n>=tot) cout<<k*n-tot; else cout<<-1; return 0; }