結果
問題 | No.2334 Distinct Cards |
ユーザー |
![]() |
提出日時 | 2023-06-02 22:31:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 86 ms / 2,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 444 ms |
コンパイル使用メモリ | 82,324 KB |
実行使用メモリ | 101,856 KB |
最終ジャッジ日時 | 2024-12-28 19:57:21 |
合計ジャッジ時間 | 2,696 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
import collectionsN, K = map(int, input().split())A = list(map(int, input().split()))Ac = collections.Counter(A)ans = 0num = 0Acv = list(Ac.values())Acv.sort(reverse=True)for c in Acv:#print(v, c)num += cans += 1if K <= num:print(ans)exit()