n = gets.to_i cheby = gets.strip.split(' ').map(&:to_i) #p @cheby goal = gets.strip.split(' ').map(&:to_i) #p @goal goal_max = goal.max cheby_max = cheby.max if goal_max < cheby_max p (goal.max.to_f / cheby.max).ceil + 1 else p (goal.max.to_f / cheby.max).ceil end