def solution(n, times):
    answer = 0
    left = 1
    right = max(times) * n
    while left < right:
        mid = (left + right) // 2
        total = 0
        for t in times:
            total += mid // t
        print(mid, total)
        if total >= n:
            right = mid
        else:
            left = mid + 1
    answer = left
    return answer

9e5b625651bceaa79329f74662f8d073179a5a67
<mask token>

def solution(n, times):
    answer = 0
    left = 1
    right = max(times) * n
    while left < right:
        mid = (left + right) // 2
        total = 0
        for t in times:
            total += mid // t
        print(mid, total)
        if total >= n:
            right = mid
        else:
            left = mid + 1
    answer = left
    return answer
