結果

問題 No.143 豆
ユーザー 👑 CleyL
提出日時 2019-09-26 23:42:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 227 bytes
コンパイル時間 605 ms
コンパイル使用メモリ 62,980 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-23 11:20:21
合計ジャッジ時間 1,122 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    int a,b,c;cin>>a>>b>>c;
    int sm = 0;
    for(int i = 0; c > i; i++){
        int tmp;cin>>tmp;
        sm += tmp;
    }
    cout << (a*b-sm < 0 ? -1:a*b-sm) << endl;
}
0