레벨2 문제
import math
import collections
def solution(progresses, speeds):
answer = []
speeds = collections.deque(speeds)
while progresses:
num = 100 - progresses[0]
up = math.ceil(num/speeds[0])
progresses = collections.deque([progresses[i] + (up * speeds[i]) for i in range(len(progresses))])
cnt = 0
while True:
if (progresses[0] < 100):
break
progresses.popleft()
speeds.popleft()
cnt += 1
if not progresses:
break
answer.append(cnt)
return answer
코드 수정은 내일