結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-03 16:55:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 233 bytes |
| 記録 | |
| コンパイル時間 | 265 ms |
| コンパイル使用メモリ | 82,364 KB |
| 実行使用メモリ | 100,336 KB |
| 最終ジャッジ日時 | 2024-12-29 03:08:10 |
| 合計ジャッジ時間 | 2,631 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 WA * 15 |
ソースコード
N,K = map(int,input().split()) a= list(map(int,input().split())) d = dict() for b in a: if b in d: d[b] += 1 else: d[b] = 1 l = sorted(d.values()) l = l[::-1] ans = 0 now = 0 while now < K: ans += 1 now += l.pop() print(ans)