you give array time timei denote time take ith bus complete tripeach bus multiple trip successively trip start immediately complete current trip also bus operate independently trip bus influence trip busyou give integer totaltrip denote number trip bus total Return minimum time require bus complete totaltrip trip Example 1input time 123 totaltrip 5output 3explanation at time t 1 number trip complete bus 100 the total number trip complete 1 0 0 1 at time t 2 number trip complete bus 210 the total number trip complete 2 1 0 3 at time t 3 number trip complete bus 311 the total number trip complete 3 1 1 5so minimum time need bus complete 5 trip 3example 2input time 2 totaltrip 1Output 2explanationthere bus complete trip t 2so minimum time need complete 1 trip 2 Constraints1 timelength 1051 timei totaltrip 107