Binary Search, O(nlogm), Easy to understand (:
Complexity
Time complexity: O(nlogm)

Space complexity: O(1)
Code
# Complexity
- Time complexity: O(nlogm)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def repairCars(self, ranks: List[int], cars: int) -> int:
        def can_repaired(time):
            cnt = 0
            for r in ranks:
                cnt += int(sqrt(time / r))
            return cnt >= cars
        
        l, r = 1, min(ranks) * cars * cars

        while l <= r:
            m = (l + r) // 2
            if can_repaired(m):
                r = m - 1
            else:
                l = m + 1
        
        return l
```
['Binary Search', 'Python3']