結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,536 KB
testcase_01 AC 72 ms
71,564 KB
testcase_02 AC 71 ms
71,344 KB
testcase_03 AC 71 ms
71,368 KB
testcase_04 RE -
testcase_05 AC 70 ms
71,276 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 71 ms
71,328 KB
testcase_19 AC 71 ms
71,496 KB
testcase_20 AC 72 ms
71,364 KB
testcase_21 AC 72 ms
71,528 KB
testcase_22 AC 71 ms
71,276 KB
testcase_23 AC 72 ms
71,328 KB
testcase_24 AC 73 ms
71,488 KB
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 AC 74 ms
71,364 KB
testcase_29 AC 76 ms
71,068 KB
testcase_30 AC 74 ms
71,064 KB
testcase_31 AC 74 ms
71,068 KB
testcase_32 AC 73 ms
71,432 KB
testcase_33 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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