import math
def solution(progresses, speeds):
answer = []
progresses = [math.ceil((100-a)/b) for a, b in zip(progresses, speeds)]
a = 0
for i in range(len(progresses)):
if progresses[a] < progresses[i]:
answer.append(i-a)
a = i
answer.append(len(progresses)-a)
return answer

'Language > Python' 카테고리의 다른 글
[Python / 프로그래머스 level 2] 전화번호 목록 (0) | 2021.08.17 |
---|---|
[Python / 프로그래머스 level 2] 위장 (0) | 2021.08.16 |
[Python / 프로그래머스 level 2] 더 맵게 (0) | 2021.08.11 |
[Python / 프로그래머스 level 2] 다음 큰 숫자 (0) | 2021.08.10 |
[Python / 프로그래머스 level 2] 카펫 (0) | 2021.08.10 |