結果
問題 | No.156 キャンディー・ボックス |
ユーザー |
|
提出日時 | 2015-04-25 15:40:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 221 bytes |
コンパイル時間 | 212 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-05 09:14:45 |
合計ジャッジ時間 | 2,013 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
n, m = map(float, input().split()) boxes = [int(b) for b in input().split()] total = 0 for i, c in enumerate(sorted(boxes)): total += c if total >= m: print(1 + (i if total == m else i - 1)) break