結果

問題 No.842 初詣
ユーザー StarMatyanStarMatyan
提出日時 2019-08-18 17:38:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 757 bytes
コンパイル時間 110 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-09 02:18:39
合計ジャッジ時間 1,794 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,752 KB
testcase_01 AC 31 ms
10,880 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 32 ms
10,752 KB
testcase_04 WA -
testcase_05 AC 32 ms
10,752 KB
testcase_06 AC 30 ms
10,752 KB
testcase_07 RE -
testcase_08 AC 30 ms
10,752 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 31 ms
10,752 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 32 ms
10,624 KB
testcase_15 AC 30 ms
10,752 KB
testcase_16 AC 31 ms
10,752 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 31 ms
10,752 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(B_d/100)

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

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

if G_d - (5*E_d) >= 0:
	G_d = G_d - (5*E_d)
else:
	G_d = G_d - 5*int(E_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