C++ || Binary Search
Code\n\n#include<bits/stdc++.h>\nusing namespace std;\n\n#define LL long long\nclass Solution {\npublic:\n    LL repairCars(vector<int>& ranks, int cars) {\n   
# Code\n```\n#include<bits/stdc++.h>\nusing namespace std;\n\n#define LL long long\nclass Solution {\npublic:\n    LL repairCars(vector<int>& ranks, int cars) {\n        LL lo=0,hi=1E15;\n        LL res=0;\n        while(lo<=hi){\n            LL mid=(lo+hi)/2;\n            LL op=0;\n            for(auto x:ranks){\n                op+=(LL)sqrtl(mid/x);\n            }\n            if(op>=cars){\n                res=mid;\n                hi=mid-1;\n            }\n            else{\n                lo=mid+1;\n            }\n        }\n        return res;\n    }\n};\n```
['Binary Search', 'C++']