코딩테스트 파이썬/파이썬 프로그래머스 2단계
H-Index
세용용용용
2023. 5. 25. 11:23

나의 코드
def solution(citations):
citations = sorted(citations)
print(citations)
l = len(citations)
for i in range(l):
#h번 이상 인용된 논문이 h번 이상
if citations[i] >= l-i:
return l-i
return 0
print(solution([3, 0, 6, 1, 5]))