728x90
반응형
정렬 문제이다.
N = int(input())
li = sorted(list(map(int, input().split())), reverse=True)
t = [li[i]-(N-i-1) for i in range(N)]
res = N + max(t) + 1
print(res)
728x90
반응형
'Agorithm > 백준 알고리즘' 카테고리의 다른 글
백준 알고리즘 2587번 대표값2(python) (0) | 2021.02.25 |
---|---|
백준 알고리즘 10709번 기상캐스터(python) (0) | 2021.02.24 |
백준 알고리즘 8979번 올림픽(python) (0) | 2021.02.24 |
백준 알고리즘 7513번 준살 프로그래밍 대회(python) (0) | 2021.02.24 |
백준 알고리즘 5800번 성적 통계(python) (0) | 2021.02.24 |