Mechanics have ranks; a mechanic of rank r can repair n cars in r * n^2 minutes. Given the ranks of all mechanics and a number of cars, return the minimum time (in minutes) to repair all the cars, with mechanics working in parallel. Input: '[ranks], cars'.
Input: '[ranks], cars'.
Output: Integer — the minimum time in minutes.
Input: [4,2,3,1], 10
Output: 16
Explanation: In 16 minutes the mechanics together repair 10 cars.Input: [5], 1
Output: 5
Explanation: One mechanic, one car.Input: [1,1,1], 5
Output: 4
Explanation: Three rank-1 mechanics.1<=n<=10^51<=rank<=1001<=cars<=10^6