import math
def solution(progresses, speeds):
days = []
answer = []
for p, s in zip(progresses, speeds):
days.append(math.ceil((100 - p) / s))
prev = 0
j = 0
answer.append(1)
for i in range(1, len(days)):
if days[prev] >= days[i] :
answer[j] += 1
else:
answer.append(1)
prev = i
j+=1
return answer
'공부 스걱스걱 > 코딩테스트' 카테고리의 다른 글
[백준] 10996번_ 별찍기 (0) | 2022.01.12 |
---|---|
[python3] 프로그래머스_숫자 문자열과 영단어 (0) | 2021.09.10 |
[python3] 프로그래머스_전화번호 목록 (0) | 2021.06.24 |
[python3]프로그래머스_내적 (0) | 2021.05.21 |
[python3]프로그래머스_모의고사 (0) | 2021.05.18 |