結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,380 KB
testcase_01 WA -
testcase_02 AC 76 ms
71,356 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 76 ms
71,496 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 74 ms
71,044 KB
testcase_19 AC 75 ms
71,416 KB
testcase_20 AC 74 ms
71,380 KB
testcase_21 AC 73 ms
71,424 KB
testcase_22 AC 73 ms
71,308 KB
testcase_23 AC 76 ms
71,328 KB
testcase_24 AC 74 ms
71,420 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 74 ms
71,552 KB
testcase_30 AC 71 ms
71,256 KB
testcase_31 AC 72 ms
71,116 KB
testcase_32 AC 72 ms
71,352 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

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