結果

問題 No.842 初詣
ユーザー StarMatyanStarMatyan
提出日時 2019-08-18 17:47:29
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
RE  
実行時間 -
コード長 757 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 7,928 KB
最終ジャッジ日時 2023-07-24 18:53:17
合計ジャッジ時間 1,407 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,808 KB
testcase_01 AC 16 ms
7,848 KB
testcase_02 AC 17 ms
7,732 KB
testcase_03 AC 17 ms
7,776 KB
testcase_04 AC 16 ms
7,760 KB
testcase_05 AC 16 ms
7,708 KB
testcase_06 AC 16 ms
7,928 KB
testcase_07 RE -
testcase_08 AC 16 ms
7,820 KB
testcase_09 AC 16 ms
7,752 KB
testcase_10 AC 16 ms
7,708 KB
testcase_11 AC 16 ms
7,740 KB
testcase_12 AC 16 ms
7,892 KB
testcase_13 AC 16 ms
7,792 KB
testcase_14 WA -
testcase_15 RE -
testcase_16 AC 16 ms
7,812 KB
testcase_17 AC 16 ms
7,776 KB
testcase_18 AC 16 ms
7,800 KB
testcase_19 RE -
testcase_20 AC 16 ms
7,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

in_data = input()
in_data_s = in_data.split(" ")

A_d = int(in_data_s[0])
B_d = int(in_data_s[1])
C_d = int(in_data_s[2])
D_d = int(in_data_s[3])
E_d = int(in_data_s[4])
F_d = int(in_data_s[5])
G_d = int(in_data_s[6])


if G_d - (500*A_d) >= 0:
	G_d = G_d - (500*A_d)
else:
	G_d = G_d - 500*int(G_d/500)


if G_d - (100*B_d) >= 0:
	G_d = G_d - (100*B_d)
else:
	G_d = G_d - 100*int(G_d/100)

if G_d - (50*C_d) >= 0:
	G_d = G_d - (50*C_d)
else:
	G_d = G_d - 50*(G_d/50)

if G_d - (10*D_d) >= 0:
	G_d = G_d - (10*D_d)
else:
	G_d = G_d - 10*int(G_d/10)

if G_d - (5*E_d) >= 0:
	G_d = G_d - (5*E_d)
else:
	G_d = G_d - 5*int(G_d/5)

if G_d >= 1 and G_d - (1*F_d) >= 0:
	G_d = G_d - (1*F_d)
else:
	G_d = int(G_d/F_d)


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