본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 13333번 Q-인덱스

by 현장 2022. 3. 19.

-코드

n = int(input())
arr = sorted(list(map(int, input().split())))
for k in range(n, -1, -1):
    if arr[-k] >= k:
        print(k)
        break