結果

問題 No.156 キャンディー・ボックス
ユーザー 310icecrystal310icecrystal
提出日時 2023-06-23 07:41:41
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 137 bytes
コンパイル時間 901 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 79,388 KB
最終ジャッジ日時 2023-09-13 02:25:04
合計ジャッジ時間 5,810 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,312 KB
testcase_01 AC 75 ms
71,452 KB
testcase_02 AC 74 ms
71,388 KB
testcase_03 AC 76 ms
71,364 KB
testcase_04 RE -
testcase_05 AC 70 ms
71,288 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 AC 70 ms
71,620 KB
testcase_19 AC 70 ms
71,320 KB
testcase_20 AC 69 ms
71,288 KB
testcase_21 AC 69 ms
71,420 KB
testcase_22 AC 69 ms
71,444 KB
testcase_23 AC 74 ms
71,620 KB
testcase_24 AC 71 ms
71,376 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 70 ms
71,284 KB
testcase_29 AC 70 ms
71,356 KB
testcase_30 AC 69 ms
71,320 KB
testcase_31 AC 68 ms
71,248 KB
testcase_32 AC 68 ms
71,612 KB
testcase_33 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

now = 0
while M-C[now]>= 0:
	M -= C[now]
	now += 1
print(now)
0