#3296

Minimum Number of Seconds to Make Mountain Height Zero

expert · 1060 · lc medium +32 · 36.9% accepted · 232 likes · top 15%

Description

You are given integer mountainHeight and integer array workerTimes. All workers work simultaneously. Worker i takes workerTimes[i] + workerTimes[i]*2 + ... + workerTimes[i]*x seconds to reduce the mountain by x.

Return the minimum seconds to bring the mountain to height 0.

Code

1
2
3