You have n robots; the cost of running a consecutive group is max(chargeTimes in the group) + (group length) * sum(runningCosts in the group). Given chargeTimes, runningCosts, and a budget, return the maximum number of consecutive robots you can run without exceeding the budget. The input is JSON {chargeTimes, runningCosts, budget}.
Input: JSON {chargeTimes, runningCosts, budget}.
Output: Integer — the maximum consecutive robots.
Input: {"chargeTimes":[3,6,1,3,4],"runningCosts":[2,1,3,4,5],"budget":25}
Output: 3
Explanation: Robots at indices 0-2 cost at most 25.Input: {"chargeTimes":[11,12,19],"runningCosts":[10,8,7],"budget":19}
Output: 0
Explanation: No single robot fits the budget.Input: {"chargeTimes":[5],"runningCosts":[2],"budget":10}
Output: 1
Explanation: One robot fits.1<=n<=5*10^4