結果

問題 No.156 キャンディー・ボックス
ユーザー shobonvipshobonvip
提出日時 2022-11-24 04:11:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 750 ms / 2,000 ms
コード長 248 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 81,748 KB
実行使用メモリ 75,288 KB
最終ジャッジ日時 2023-10-25 21:22:57
合計ジャッジ時間 5,254 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
61,928 KB
testcase_01 AC 38 ms
53,500 KB
testcase_02 AC 37 ms
53,500 KB
testcase_03 AC 36 ms
53,500 KB
testcase_04 AC 38 ms
53,500 KB
testcase_05 AC 64 ms
72,536 KB
testcase_06 AC 84 ms
75,284 KB
testcase_07 AC 99 ms
75,140 KB
testcase_08 AC 73 ms
75,152 KB
testcase_09 AC 62 ms
72,172 KB
testcase_10 AC 76 ms
75,152 KB
testcase_11 AC 60 ms
72,176 KB
testcase_12 AC 107 ms
75,140 KB
testcase_13 AC 71 ms
75,152 KB
testcase_14 AC 60 ms
72,180 KB
testcase_15 AC 95 ms
75,140 KB
testcase_16 AC 62 ms
72,172 KB
testcase_17 AC 76 ms
75,288 KB
testcase_18 AC 56 ms
66,028 KB
testcase_19 AC 54 ms
68,084 KB
testcase_20 AC 43 ms
59,868 KB
testcase_21 AC 47 ms
61,932 KB
testcase_22 AC 55 ms
66,028 KB
testcase_23 AC 49 ms
63,988 KB
testcase_24 AC 38 ms
53,500 KB
testcase_25 AC 37 ms
53,500 KB
testcase_26 AC 37 ms
53,500 KB
testcase_27 AC 37 ms
53,500 KB
testcase_28 AC 37 ms
53,500 KB
testcase_29 AC 38 ms
53,500 KB
testcase_30 AC 142 ms
75,168 KB
testcase_31 AC 79 ms
75,152 KB
testcase_32 AC 749 ms
75,188 KB
testcase_33 AC 750 ms
75,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
c = list(map(int,input().split()))
for i in range(m):
	tmp = 10**9
	ind = 0
	for j in range(n):
		if 0 < c[j] < tmp:
			tmp = c[j]
			ind = j
	c[ind] -= 1

ans = 0
for i in range(n):
	if 0 == c[i]: ans += 1
print(ans)
0