結果
| 問題 | No.2334 Distinct Cards |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2023-06-02 21:45:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 277 bytes |
| 記録 | |
| コンパイル時間 | 1,673 ms |
| コンパイル使用メモリ | 81,792 KB |
| 実行使用メモリ | 107,648 KB |
| 最終ジャッジ日時 | 2024-12-28 17:08:17 |
| 合計ジャッジ時間 | 2,778 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 13 |
ソースコード
import collections
N,K = map(int, input().split())
A = list(map(int, input().split()))
CA = collections.Counter(A)
L = []
for k in CA.values():
L.append(k)
sorted(L,reverse=True)
ans = 0
for i,l in enumerate(L):
K-=l
if K<=0:
print(i+1)
exit()
H20