結果
| 問題 | No.156 キャンディー・ボックス |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-20 17:43:05 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 698 ms / 2,000 ms |
| + 430µs | |
| コード長 | 267 bytes |
| 記録 | |
| コンパイル時間 | 294 ms |
| コンパイル使用メモリ | 21,412 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-08 04:24:54 |
| 合計ジャッジ時間 | 6,974 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 30 |
ソースコード
def main():
N, M = map(int, input().split())
C = list(map(int, input().split()))
C.sort()
for _ in range(M):
C[0] -= 1
if C[0] == 0:
C.pop(0)
print(N-len(C))
if __name__ == '__main__':
main()