문제
(프로그래머스) 프린터
Python 풀이
def solution(priorities, location):
answer = 0
nums= sorted(priorities, reverse=True)
n=0
while True:
for i, j in enumerate(priorities):
n_nums = nums[n]
if j == n_nums:
n += 1
answer += 1
if i == location:
break
else:
continue
break
return answer