def minimum_time(time, total_trips) (1..).bsearch{|i|time.sum{|k|i/k}>=total_trips} end