gets a = gets.split.map &:to_i p a.each_cons(2).map{|x, y| y - x }.min p a[-1] - a[0]