結果
| 問題 | No.156 キャンディー・ボックス |
| コンテスト | |
| ユーザー |
bellangeldindon
|
| 提出日時 | 2019-05-07 17:16:33 |
| 言語 | PyPy2 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 171 bytes |
| 記録 | |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 77,576 KB |
| 最終ジャッジ日時 | 2025-12-04 01:38:47 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 RE * 1 |
| other | AC * 14 RE * 16 |
ソースコード
N, M = map(int, raw_input().split()) candy = map(int, raw_input().split()) candy.sort() cnt = 0 while(True): if M < candy[0]: break M -= candy.pop(0) cnt += 1 print cnt
bellangeldindon