結果
問題 |
No.143 豆
|
ユーザー |
|
提出日時 | 2020-10-05 07:14:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 550 ms |
コンパイル使用メモリ | 66,168 KB |
最終ジャッジ日時 | 2025-01-15 02:50:59 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 3 |
ソースコード
#include<iostream> using namespace std; int main(){ int k,n,f,to=0,m; cin >> k >> n >> f; int a[f]; for(int i=0; i < f;++i){ cin >> a[i]; to += a[i]; } m = k * n; if(m < 0) cout << -1 << endl; else cout << m- to <<endl; return 0; }