結果

問題 No.2334 Distinct Cards
ユーザー dangodango
提出日時 2023-06-14 16:06:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 86,732 KB
実行使用メモリ 92,780 KB
最終ジャッジ日時 2023-09-05 03:49:53
合計ジャッジ時間 4,514 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,036 KB
testcase_01 AC 72 ms
71,088 KB
testcase_02 AC 72 ms
70,992 KB
testcase_03 AC 75 ms
71,196 KB
testcase_04 AC 71 ms
71,068 KB
testcase_05 AC 71 ms
70,920 KB
testcase_06 AC 72 ms
71,012 KB
testcase_07 AC 71 ms
71,032 KB
testcase_08 AC 71 ms
71,168 KB
testcase_09 AC 73 ms
70,912 KB
testcase_10 AC 74 ms
70,932 KB
testcase_11 AC 74 ms
71,164 KB
testcase_12 AC 107 ms
91,528 KB
testcase_13 AC 107 ms
91,708 KB
testcase_14 AC 106 ms
91,820 KB
testcase_15 AC 106 ms
91,644 KB
testcase_16 AC 103 ms
91,688 KB
testcase_17 AC 96 ms
91,236 KB
testcase_18 AC 98 ms
91,452 KB
testcase_19 AC 97 ms
91,492 KB
testcase_20 AC 98 ms
91,528 KB
testcase_21 AC 98 ms
92,780 KB
testcase_22 AC 96 ms
91,844 KB
testcase_23 AC 74 ms
71,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
A = list(map(int, input().split()))
B = [0] * (N + 1)
for a in A: B[a] += 1
a = 0
for b in sorted(B, reverse=True):
	a += 1
	K -= b
	if K<1: break
print(a)
0