結果

問題 No.2334 Distinct Cards
ユーザー anasta
提出日時 2023-06-16 20:43:34
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 26,840 KB
最終ジャッジ日時 2024-06-24 12:22:34
合計ジャッジ時間 2,978 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

N,K=map(lambda x: int(x), input().split())

ct = 0
tmp = 0

for p in collections.Counter(list(map(lambda x: int(x), input().split()))).most_common():
	
	ct+=1
	tmp += p[1]

	if tmp >= K:
		break

print(ct)
0