結果

問題 No.1015 おつりは要らないです
ユーザー yosakayosaka
提出日時 2020-04-03 21:27:53
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 649 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,592 KB
実行使用メモリ 19,176 KB
最終ジャッジ日時 2023-09-16 00:08:23
合計ジャッジ時間 3,504 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 17 ms
7,852 KB
testcase_04 AC 16 ms
7,824 KB
testcase_05 AC 16 ms
7,772 KB
testcase_06 AC 15 ms
7,764 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 69 ms
18,636 KB
testcase_11 AC 71 ms
18,748 KB
testcase_12 AC 67 ms
18,220 KB
testcase_13 AC 71 ms
18,468 KB
testcase_14 AC 70 ms
19,176 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 71 ms
18,608 KB
testcase_21 AC 71 ms
18,588 KB
testcase_22 AC 69 ms
18,504 KB
testcase_23 AC 68 ms
18,164 KB
testcase_24 AC 71 ms
18,680 KB
testcase_25 AC 70 ms
18,612 KB
testcase_26 AC 69 ms
18,624 KB
testcase_27 AC 68 ms
18,504 KB
testcase_28 AC 67 ms
18,408 KB
testcase_29 AC 69 ms
18,716 KB
testcase_30 AC 15 ms
7,832 KB
testcase_31 AC 69 ms
9,884 KB
testcase_32 WA -
testcase_33 WA -
testcase_34 AC 16 ms
7,796 KB
testcase_35 WA -
testcase_36 AC 16 ms
7,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
N, X, Y, Z = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N):
    v = A[i]
    # t = v // 10000
    # Z -= t
    # v %= 10000
    # t = v // 5000
    # Y -= t
    # v %= 5000
    
    while v > 0:
        if v <= 1000:
            v -= 1000
            X -= 1
            continue
        elif v <= 5000:
            v -= 5000
            Y -= 1
            continue
        elif v <= 10000:
            v -= 10000
            Z -= 1
            continue
        else:
            break
# if X >= 0 and Y >= 0 and Z >= 0:
if X * 1000 + Y * 5000 + Z * 10000 >= 0:
    print("Yes")
else:
    print("No")
0