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