結果

問題 No.842 初詣
ユーザー miya145592miya145592
提出日時 2023-05-21 05:20:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 71,452 KB
最終ジャッジ日時 2023-08-23 12:27:58
合計ジャッジ時間 3,256 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,044 KB
testcase_01 AC 70 ms
70,916 KB
testcase_02 AC 72 ms
71,440 KB
testcase_03 AC 72 ms
71,420 KB
testcase_04 AC 71 ms
71,256 KB
testcase_05 AC 70 ms
71,260 KB
testcase_06 AC 71 ms
70,996 KB
testcase_07 AC 70 ms
71,436 KB
testcase_08 AC 71 ms
71,168 KB
testcase_09 AC 71 ms
71,280 KB
testcase_10 AC 71 ms
70,916 KB
testcase_11 AC 71 ms
71,452 KB
testcase_12 AC 71 ms
71,432 KB
testcase_13 AC 71 ms
71,308 KB
testcase_14 AC 71 ms
71,000 KB
testcase_15 AC 72 ms
71,352 KB
testcase_16 AC 74 ms
71,144 KB
testcase_17 AC 72 ms
71,176 KB
testcase_18 AC 74 ms
71,176 KB
testcase_19 AC 72 ms
71,364 KB
testcase_20 AC 70 ms
71,360 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B, C, D, E, F, G = map(int, input().split())
a = G//500
G -= min(A, a)*500
b = G//100
G -= min(B, b)*100
c = G//50
G -= min(C, c)*50
d = G//10
G -= min(D, d)*10
e = G//5
G -= min(E, e)*5
f = G//1
G -= min(F, f)*1
if G==0:
    print("YES")
else:
    print("NO")
0