結果
| 問題 |
No.2334 Distinct Cards
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-02 13:57:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 345 bytes |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 25,432 KB |
| 最終ジャッジ日時 | 2024-07-16 09:51:16 |
| 合計ジャッジ時間 | 2,302 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 7 WA * 15 |
ソースコード
N, K = map(int, input().split())
cards = list(map(int, input().split()))
count = {}
for card in cards:
if card in count:
count[card] += 1
else:
count[card] = 1
sorted_counts = sorted(count.values())
types = 0
total = 0
for c in sorted_counts:
total += 1
if total > K:
break
types += 1
print(types)