結果

問題 No.842 初詣
ユーザー amanoftheday02amanoftheday02
提出日時 2019-07-12 12:44:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 861 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-28 16:02:32
合計ジャッジ時間 1,519 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

input = input()
coin_list = input.split()
G = int(coin_list[6])

for i in range(6):
    print(i , coin_list[i])
    for j in range(int(coin_list[i])):
        if i == 0:
            if G >= 500:
                G = G - 500
            else:
                break
        if i == 1:
            if G >= 100:
                G = G - 100
            else:
                break
        if i == 2:
            if G >= 50:
                G = G - 50
            else:
                break
        if i == 3:
            if G >= 10:
                G = G - 10
            else:
                break
        if i == 4:
            if G >= 5:
                G = G - 5
            else:
                break
        if i == 5:
            if G >= 1:
                G = G - 1
            else:
                break

if G == 0:
    print("YES")
else:
    print("NO")
0