[Programmers] 명예의 전당 (1)
Python
def solution(k, score):
arr = []
answer = []
for s in score:
arr.append(s)
if (len(arr) > k):
arr.remove(min(arr))
answer.append(min(arr))
return answer
def solution(k, score):
arr = []
answer = []
for s in score:
arr.append(s)
if (len(arr) > k):
arr.remove(min(arr))
answer.append(min(arr))
return answer
댓글남기기