728x90
https://school.programmers.co.kr/learn/courses/30/lessons/42747
def solution(citations):
answer = 0
citations.sort(reverse=True)
max = citations[0]
min = 0
for answer in range(max, min-1, -1):
tmp = filter(lambda x: x >= answer, citations)
List = list(tmp)
if len(List) >= answer and len(citations) - len(List) <= answer:
break
return answer
'코딩' 카테고리의 다른 글
| 프로그래머스 - 코딩테스트 고득점 Kit - 해시 - 완주하지 못한 선수 (python) (0) | 2023.01.23 |
|---|---|
| 프로그래머스 - 코딩테스트 고득점 Kit - 해시 - 폰켓몬 (python) (0) | 2023.01.23 |
| 프로그래머스 - 코딩테스트 고득점 Kit - 정렬 - K번째수 (python) (0) | 2023.01.19 |
| 프로그래머스 - 코딩테스트 고득점 Kit - 정렬 - 가장 큰 수 (python) (실패...) (0) | 2023.01.19 |
| 프로그래머스 - 코딩테스트 고득점 Kit - 스택/큐 - 주식가격 (python) (0) | 2023.01.04 |