Python 3   ||   3 lines,  bisect_left   || T/S: 58% / 54%
Note that we can use integer division and integer square root isqrt because of the nature of the problem. \n\nclass Solution:\n    def repairCars(self, ranks: L
Note that we can use integer division and integer square root `isqrt` because of the nature of the problem. \n```\nclass Solution:\n    def repairCars(self, ranks: List[int], cars: int) -> int:\n        \n        arr = range(cars*cars * max(ranks))\n\n        f = lambda t: sum(isqrt(t//r) for r in ranks)\n\n        return  bisect_left(arr,cars, key = lambda t: f(t))\n```\n[https://leetcode.com/problems/minimum-time-to-repair-cars/submissions/1295850782/](https://leetcode.com/problems/minimum-time-to-repair-cars/submissions/1295850782/)\n\nI could be wrong, but I think that time complexity is *O*(*N*) and space complexity is *O*(*C*), in which *N* ~ `len(ranks)` and *N* ~ `cars`.
['Python3']