[Programmers] 과일 장수
Python
def solution(k, m, score):
answer = 0
sort_score = sorted(score, reverse=True)
lst = []
for i in range(len(sort_score)):
lst.append(sort_score[i])
if len(lst) == m:
answer += min(lst) * m
lst = []
return answer
댓글남기기