結果
| 問題 |
No.156 キャンディー・ボックス
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-24 20:32:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 250 bytes |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-11-07 05:27:23 |
| 合計ジャッジ時間 | 9,438 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 28 TLE * 2 |
ソースコード
n, m = map(int, input().split())
c = list(map(int, input().split()))
c.sort()
i = 0
cnt = 0
while cnt < m:
if c[i] > 0:
c[i] -= 1
cnt += 1
else:
i += 1
ans = 0
for ci in c:
if ci == 0:
ans += 1
print(ans)