gets point_array = gets.chomp.split(" ").uniq.map(&:to_i).sort n = point_array.size - 1 min = 10000000 n.times{|i| judge = point_array[i + 1] - point_array[i] if judge < min min = judge end } if min == 10000000 puts 0 else puts min end