Python Easy solution with Easy explanation
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \nApply binary search on 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nApply binary search on time.\nImportant things:\n1) Setting the limits\n    left limit: 0(if no cars)\n    right limit: cars*(maximum rating)<sup>2</sup>\n2) Check function.\n    finding number of cars can be repaired with given time(countcars).\n    if(totalcars>countcars):\n        not possible with that time \n        move left pointer to mid+1\n    else:\n        store the mid val\n        move right pointer to mid-1\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n# o(nlogn)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n# o(1)\n\n# Code\n```\nfrom math import sqrt\n\nclass Solution:\n    def repairCars(self, ranks: List[int], cars: int) -> int:\n        def check(maxtime):\n            total=0\n            for i in range(len(ranks)):\n                total+=int(sqrt(maxtime//ranks[i]))\n                if(total>=cars):\n                    return True\n            return False\n        left=0\n        right=cars*cars*max(ranks)\n        ans=-1\n        while(left<=right):\n            mid=left+(right-left)//2\n            if(check(mid)):\n                ans=mid\n                right=mid-1\n            else:\n                left=mid+1\n        return ans\n\n\n\n            \n\n        \n```
['Binary Search', 'Python', 'Python3']