結果

問題 No.1380 Borderline
ユーザー hir355hir355
提出日時 2021-02-07 20:34:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 104 ms / 2,000 ms
コード長 221 bytes
コンパイル時間 342 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 71,668 KB
最終ジャッジ日時 2023-09-19 04:23:00
合計ジャッジ時間 6,644 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
71,644 KB
testcase_01 AC 98 ms
71,512 KB
testcase_02 AC 103 ms
71,168 KB
testcase_03 AC 101 ms
71,320 KB
testcase_04 AC 104 ms
71,372 KB
testcase_05 AC 98 ms
71,280 KB
testcase_06 AC 101 ms
71,280 KB
testcase_07 AC 100 ms
71,372 KB
testcase_08 AC 96 ms
71,572 KB
testcase_09 AC 97 ms
71,360 KB
testcase_10 AC 104 ms
71,280 KB
testcase_11 AC 103 ms
71,236 KB
testcase_12 AC 97 ms
71,248 KB
testcase_13 AC 98 ms
71,372 KB
testcase_14 AC 96 ms
71,280 KB
testcase_15 AC 100 ms
71,636 KB
testcase_16 AC 99 ms
71,324 KB
testcase_17 AC 97 ms
71,168 KB
testcase_18 AC 95 ms
71,632 KB
testcase_19 AC 98 ms
71,240 KB
testcase_20 AC 99 ms
71,296 KB
testcase_21 AC 100 ms
71,244 KB
testcase_22 AC 95 ms
71,292 KB
testcase_23 AC 96 ms
71,244 KB
testcase_24 AC 96 ms
71,668 KB
testcase_25 AC 96 ms
71,452 KB
testcase_26 AC 97 ms
71,432 KB
testcase_27 AC 101 ms
71,320 KB
testcase_28 AC 97 ms
71,604 KB
testcase_29 AC 96 ms
71,604 KB
testcase_30 AC 100 ms
71,372 KB
testcase_31 AC 97 ms
71,364 KB
testcase_32 AC 101 ms
71,424 KB
testcase_33 AC 100 ms
71,636 KB
testcase_34 AC 98 ms
71,292 KB
testcase_35 AC 98 ms
71,276 KB
testcase_36 AC 96 ms
71,320 KB
testcase_37 AC 95 ms
71,396 KB
testcase_38 AC 96 ms
71,296 KB
testcase_39 AC 95 ms
71,144 KB
testcase_40 AC 98 ms
71,340 KB
testcase_41 AC 99 ms
71,244 KB
testcase_42 AC 95 ms
71,240 KB
testcase_43 AC 99 ms
71,248 KB
testcase_44 AC 96 ms
71,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n, k = map(int, input().split())
p = list(map(int, input().split()))
c = list(reversed(sorted(Counter(p).items())))
t = 0
for ka, x in c:
    if t + x > k:
        break
    t += x
print(t)
0