You are viewing a single comment's thread. Return to all comments →
def minTime(machines, goal): machines.sort() worst = machines[-1] * goal//len(machines) best = machines[0] * goal//len(machines) result = -1 while worst>best+1: mid = best+(worst - best) // 2 count = 0 for machine in machines: count += mid//machine if count >=goal: worst = mid result = mid else: best = mid return result
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Time Required
You are viewing a single comment's thread. Return to all comments →