結果
問題 |
No.2334 Distinct Cards
|
ユーザー |
![]() |
提出日時 | 2023-06-03 03:49:23 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 153 ms / 2,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 399 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 109,696 KB |
最終ジャッジ日時 | 2024-12-29 02:30:18 |
合計ジャッジ時間 | 3,911 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
N,K = map(int,input().split()) A = list(map(int,input().split())) from collections import Counter A_count = Counter(A) A_count_sorted = sorted(A_count.items(),key = lambda x:x[1],reverse=True) i = 0 while K >= 1: K -= A_count_sorted[i][1] i += 1 print(i)