結果
| 問題 |
No.156 キャンディー・ボックス
|
| コンテスト | |
| ユーザー |
hiro_metal_core
|
| 提出日時 | 2017-11-06 00:02:52 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 385 bytes |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 21,632 KB |
| 最終ジャッジ日時 | 2024-11-24 02:59:18 |
| 合計ジャッジ時間 | 7,904 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 RE * 2 TLE * 2 |
ソースコード
N, M = map(int, input().split())
C = list(map(int, input().split()))
l = len(C)
while(M > 0):
min_c = 100000
for i in range(l):
if (C[i] < min_c and C[i] != 0):
min_c = C[i]
min_c_loc = i
M -= C[min_c_loc]
if (M >= 0):
C[min_c_loc] = 0
empty_box = 0
for c in C:
if (c == 0):
empty_box += 1
print(empty_box)
hiro_metal_core