結果

問題 No.156 キャンディー・ボックス
ユーザー kaminomisosirukaminomisosiru
提出日時 2018-02-05 22:32:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 297 bytes
コンパイル時間 122 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 13,032 KB
最終ジャッジ日時 2023-09-22 15:54:10
合計ジャッジ時間 11,222 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
8,580 KB
testcase_01 AC 18 ms
8,532 KB
testcase_02 AC 18 ms
8,760 KB
testcase_03 AC 18 ms
8,520 KB
testcase_04 AC 18 ms
8,528 KB
testcase_05 AC 217 ms
8,560 KB
testcase_06 AC 461 ms
8,572 KB
testcase_07 AC 363 ms
8,504 KB
testcase_08 AC 292 ms
8,540 KB
testcase_09 AC 226 ms
8,672 KB
testcase_10 AC 349 ms
8,496 KB
testcase_11 AC 202 ms
8,508 KB
testcase_12 AC 435 ms
8,532 KB
testcase_13 AC 293 ms
8,584 KB
testcase_14 AC 207 ms
8,664 KB
testcase_15 AC 341 ms
8,708 KB
testcase_16 AC 227 ms
8,624 KB
testcase_17 AC 291 ms
8,684 KB
testcase_18 AC 116 ms
8,524 KB
testcase_19 AC 138 ms
8,680 KB
testcase_20 AC 26 ms
8,724 KB
testcase_21 AC 49 ms
8,588 KB
testcase_22 AC 108 ms
8,688 KB
testcase_23 AC 61 ms
8,564 KB
testcase_24 AC 19 ms
8,536 KB
testcase_25 AC 18 ms
8,652 KB
testcase_26 AC 18 ms
8,672 KB
testcase_27 AC 18 ms
8,536 KB
testcase_28 AC 18 ms
8,572 KB
testcase_29 AC 18 ms
8,572 KB
testcase_30 AC 1,195 ms
8,528 KB
testcase_31 AC 424 ms
8,560 KB
testcase_32 TLE -
testcase_33 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8

from collections import Counter
import math

n,m = map(int, input().split(" "))
candys = list(map(int,input().split(" ")))

while m != 0:
    min_ = candys.pop(candys.index(min(candys)))
    min_ -= 1
    if min_ != 0:
        candys.append(min_)
    m -= 1
print(n - len(candys))
0