홈 » Posts파이썬 알고리즘 : 기능개발스택2024년 4월 26일 · 1 분 · 배준수 | 수정 제안목차문제난이도코드2024년 4월 26일 알고리즘 문제풀이#문제#기능개발난이도#Lv. 2코드# 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 def solution(progresses, speeds): answer = [] idx = 0 while idx < len(progresses): cnt = 0 for i in range(len(progresses)): progresses[i] += speeds[i] while idx < len(progresses): if progresses[idx] >= 100: idx += 1 cnt += 1 else: break if cnt: answer.append(cnt) return answer 가장 앞에 있는 기능이 100이 될때까지 모든 값들의 크기를 늘렸다. 이후 첫번 째 기능 개발이 완료되었을 때 100이 넘는 것들을 같이 처리해주고 갯수를 세주었다.댓글댓글 불러오기
댓글