gets p gets.split.map(&:to_i).uniq.sort.each_cons(2).map{|i,j|j-i}.min||0