기능개발

def solution(progresses, speeds):
    answer = []
    distribution_number = 0
    
    while progresses:
        if progresses[0] >= 100:
            distribution_number += 1
            progresses.pop(0)
            speeds.pop(0)
        else:
            if distribution_number != 0:
                answer.append(distribution_number)
                distribution_number = 0
            progresses = [progress + speed for progress, speed in zip(progresses, speeds)]

    answer.append(distribution_number)
    return answer

Last updated