結果

問題 No.156 キャンディー・ボックス
ユーザー yuki2006yuki2006
提出日時 2015-02-24 00:16:28
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 179 bytes
コンパイル時間 241 ms
コンパイル使用メモリ 77,352 KB
実行使用メモリ 76,720 KB
最終ジャッジ日時 2023-09-06 03:33:02
合計ジャッジ時間 4,166 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
76,140 KB
testcase_01 AC 71 ms
76,172 KB
testcase_02 AC 70 ms
76,476 KB
testcase_03 AC 70 ms
76,396 KB
testcase_04 WA -
testcase_05 AC 72 ms
76,356 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 72 ms
76,172 KB
testcase_19 AC 74 ms
76,140 KB
testcase_20 AC 76 ms
76,720 KB
testcase_21 AC 74 ms
76,524 KB
testcase_22 AC 71 ms
76,356 KB
testcase_23 AC 71 ms
76,620 KB
testcase_24 AC 71 ms
76,208 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 73 ms
76,136 KB
testcase_29 AC 72 ms
76,452 KB
testcase_30 AC 72 ms
76,160 KB
testcase_31 AC 72 ms
76,476 KB
testcase_32 AC 73 ms
76,368 KB
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, raw_input().split())

C = map(int, raw_input().split())

total = 0
for i, c in enumerate(sorted(C)):
    total += c
    if total > M:
        print i
        break
0