結果

問題 No.1015 おつりは要らないです
ユーザー chinchillachinchilla
提出日時 2020-04-03 23:52:02
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 10,740 KB
実行使用メモリ 18,908 KB
最終ジャッジ日時 2023-08-11 08:48:50
合計ジャッジ時間 4,031 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,736 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 15 ms
7,764 KB
testcase_03 AC 16 ms
7,768 KB
testcase_04 AC 16 ms
7,804 KB
testcase_05 AC 15 ms
7,812 KB
testcase_06 AC 16 ms
7,808 KB
testcase_07 AC 16 ms
7,760 KB
testcase_08 AC 15 ms
7,892 KB
testcase_09 AC 16 ms
7,852 KB
testcase_10 AC 88 ms
18,732 KB
testcase_11 AC 91 ms
18,664 KB
testcase_12 AC 87 ms
18,216 KB
testcase_13 AC 89 ms
18,608 KB
testcase_14 AC 93 ms
18,804 KB
testcase_15 AC 85 ms
18,228 KB
testcase_16 AC 89 ms
18,516 KB
testcase_17 AC 93 ms
18,828 KB
testcase_18 AC 90 ms
18,524 KB
testcase_19 AC 90 ms
18,592 KB
testcase_20 AC 84 ms
18,664 KB
testcase_21 AC 84 ms
18,604 KB
testcase_22 AC 84 ms
18,524 KB
testcase_23 AC 80 ms
18,116 KB
testcase_24 AC 85 ms
18,752 KB
testcase_25 AC 83 ms
18,572 KB
testcase_26 AC 83 ms
18,668 KB
testcase_27 AC 82 ms
18,516 KB
testcase_28 AC 80 ms
18,468 KB
testcase_29 AC 83 ms
18,644 KB
testcase_30 AC 16 ms
7,932 KB
testcase_31 AC 60 ms
10,084 KB
testcase_32 AC 60 ms
10,080 KB
testcase_33 AC 87 ms
18,908 KB
testcase_34 AC 16 ms
7,812 KB
testcase_35 AC 16 ms
7,920 KB
testcase_36 AC 16 ms
7,868 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x, y, z = map(int, input().split())
C = [-((int(w)+1)//-1000) for w in input().split()]
m = sum(c//10 for c in C)
z, m = max(z-m, 0), max(m-z, 0)
C = sorted(c%10 for c in C)[:max(n-z, 0)]
f = sum(c//5 for c in C) + 2*m
y, f = max(y-f, 0), max(f-y, 0)
C = sorted(c%5 for c in C)[:max(len(C)-y, 0)]
t = sum(C) + 5*f
print('No' if t>x else 'Yes')
0