문제출처: https://programmers.co.kr/learn/courses/30/lessons/43238
접근법
알고리즘 분류가 이분 탐색인 것을 몰랐다면 많이 헤맸을 것 같다.
1. 일단 먼저 최소~최대 범위를 구해야한다.
코드
def solution(n, times): start = min(times) end = max(times) * n while(True): if( end-start == 1 ): return start if sum(start//time for time in times) == n else end mid = (start+end)//2 m = sum(mid//time for time in times) if( m >=n ): end = mid else: start = mid