You are viewing a single comment's thread. Return to all comments →
I understand your logic and tried to implement in python. However, its failing all the test cases except the first three sample cases.
` def minTime(machines, goal): one_daywork = 0 for i in machines: one_daywork += 1/i
ans = (goal/one_daywork) if (round(ans, 6)).is_integer(): return int(ans) else: return (int(math.ceil(ans))) ```
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 →
I understand your logic and tried to implement in python. However, its failing all the test cases except the first three sample cases.
` def minTime(machines, goal): one_daywork = 0 for i in machines: one_daywork += 1/i