結果
| 問題 |
No.156 キャンディー・ボックス
|
| コンテスト | |
| ユーザー |
shobonvip
|
| 提出日時 | 2022-11-24 04:11:21 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 748 ms / 2,000 ms |
| コード長 | 248 bytes |
| コンパイル時間 | 323 ms |
| コンパイル使用メモリ | 82,196 KB |
| 実行使用メモリ | 75,632 KB |
| 最終ジャッジ日時 | 2024-09-25 06:03:56 |
| 合計ジャッジ時間 | 4,997 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
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)
shobonvip