gets q=gets.split.map{|c|[c=c.to_f,c,1]}.sort (gets.to_i-1).times{ _,l,d=q.pop s=l/d+=1 q[(0...q.size).bsearch{|i|q[i][0]>s}||q.size,0]=[[s,l,d]] } p q[-1][0]