티스토리 뷰
programmers.co.kr/learn/courses/30/lessons/42586
코딩테스트 연습 - 기능개발
프로그래머스 팀에서는 기능 개선 작업을 수행 중입니다. 각 기능은 진도가 100%일 때 서비스에 반영할 수 있습니다. 또, 각 기능의 개발속도는 모두 다르기 때문에 뒤에 있는 기능이 앞에 있는
programmers.co.kr
import math
def solution(progresses, speeds):
answer = []
progress = [math.ceil((100 - progresses[i]) / speeds[i]) for i in range(len(progresses))]
idx = 0
for i in range(len(progress)):
if progress[i] > progress[idx]:
answer.append(i-idx)
idx = i
answer.append(len(progress) - idx)
return answer'Algorithm > Programmers' 카테고리의 다른 글
| [프로그래머스] 실패율 - Python (0) | 2021.03.28 |
|---|---|
| [프로그래머스] 오픈채팅방 - Python (0) | 2021.03.27 |
| [프로그래머스] 튜플 - Python (0) | 2021.03.25 |
| [프로그래머스] 구명보트 - Python (0) | 2021.03.25 |
| [프로그래머스] 다리를 지나는 트럭 - Python (0) | 2021.03.25 |
