結果

問題 No.1380 Borderline
ユーザー O2MT
提出日時 2021-02-08 00:41:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 51 ms / 2,000 ms
コード長 233 bytes
コンパイル時間 153 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 60,928 KB
最終ジャッジ日時 2024-07-05 17:09:21
合計ジャッジ時間 3,344 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int,input().split())
P = list(map(int,input().split()))

ans = 0

for B in range(max(P)+2):
    count = 0
    for p in P:
        if p >= B:
            count += 1
    if count <= K:
        ans = max(ans,count)

print(ans)
0