結果

問題 No.156 キャンディー・ボックス
ユーザー ABKZABKZ
提出日時 2021-07-04 00:10:31
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,352 KB
実行使用メモリ 71,508 KB
最終ジャッジ日時 2023-09-13 06:07:24
合計ジャッジ時間 3,977 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,360 KB
testcase_01 AC 69 ms
71,428 KB
testcase_02 AC 69 ms
71,308 KB
testcase_03 AC 69 ms
71,296 KB
testcase_04 AC 69 ms
71,312 KB
testcase_05 AC 72 ms
71,292 KB
testcase_06 AC 70 ms
71,500 KB
testcase_07 AC 71 ms
71,348 KB
testcase_08 AC 70 ms
71,160 KB
testcase_09 AC 69 ms
71,160 KB
testcase_10 AC 70 ms
71,292 KB
testcase_11 AC 70 ms
71,132 KB
testcase_12 AC 69 ms
71,084 KB
testcase_13 AC 69 ms
71,504 KB
testcase_14 AC 68 ms
71,308 KB
testcase_15 AC 70 ms
71,504 KB
testcase_16 AC 69 ms
71,300 KB
testcase_17 AC 70 ms
71,296 KB
testcase_18 AC 70 ms
71,324 KB
testcase_19 AC 69 ms
71,356 KB
testcase_20 AC 69 ms
71,292 KB
testcase_21 AC 69 ms
71,156 KB
testcase_22 AC 70 ms
71,332 KB
testcase_23 AC 70 ms
71,292 KB
testcase_24 AC 70 ms
71,296 KB
testcase_25 AC 70 ms
71,328 KB
testcase_26 AC 70 ms
71,296 KB
testcase_27 AC 69 ms
71,344 KB
testcase_28 AC 69 ms
71,508 KB
testcase_29 AC 69 ms
71,344 KB
testcase_30 AC 68 ms
71,448 KB
testcase_31 AC 68 ms
71,424 KB
testcase_32 AC 69 ms
71,496 KB
testcase_33 AC 68 ms
71,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
C = list(map(int, input().split()))
C.sort()

for i in range(N):
    M = M - C[i]
    if M >= 0:
        C[i] = 0

print(C.count(0))
0