結果

問題 No.842 初詣
ユーザー k_kiri
提出日時 2019-07-20 22:40:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 2,695 ms
コンパイル使用メモリ 166,996 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-30 20:04:33
合計ジャッジ時間 3,612 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;

int main() {
    int sum=0;
    vector<int> coin={500,100,50,10,5,1};
    for (int i = 0; i < 6; i++) {
        int x;
        cin >> x;
        sum+=coin[i]*x;
    }
    int g;
    cin >> g;
    if(sum<g)cout << "NO" << endl;
    else cout << "YES" <<endl;
}
0