Skip to content

Instantly share code, notes, and snippets.

@YOUNGJUN2
Created December 13, 2019 10:14
Show Gist options
  • Save YOUNGJUN2/7803db562c96016d3527dd330f197b20 to your computer and use it in GitHub Desktop.
Save YOUNGJUN2/7803db562c96016d3527dd330f197b20 to your computer and use it in GitHub Desktop.
def solution(citations):
answer = 0
i = 0
l=[]
while True:
a = b = 0
if i > len(citations):
break
for j in citations:
if j >= i:
a+=1
elif j < i:
b+=1
if (a>=i) and (b<=i):
l.append(i)
i+=1
answer=max(l)
return answer
# https://programmers.co.kr/learn/courses/30/lessons/42747
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment