you n robot you give 0indexed integer array chargetime runningcost length n the ith robot cost chargetimesi unit charge cost runningcostsi unit run you give integer budgetthe total cost run k choose robot equal maxchargetime k sumrunningcost maxchargetime large charge cost k robot sumrunningcost sum run cost k robotsreturn maximum number consecutive robot run total cost exceed budget Example 1input chargetime 36134 runningcost 21345 budget 25output 3explanation it possible run individual consecutive pair robot budgetTo obtain answer 3 consider 3 robot the total cost max361 3 sum213 6 3 6 24 25it show possible run 3 consecutive robot budget return 3example 2input chargetime 111219 runningcost 1087 budget 19output 0explanation no robot run exceed budget return 0 ConstraintschargeTimeslength runningcostslength n1 n 5 1041 chargetimesi runningcostsi 1051 budget 1015