func main() var N: int :: cui@input().toInt(&) var _: [][]char :: cui@input().split(" ") var a: []int :: #[N]int for i(0, N - 1) do a[i] :: _[i].toInt(&) end for do a.sort() var ans: int :: 0 for i(1, N - 1) var v: int :: a[i] - a[i - 1] if(v <> 0) do ans :: ans = 0 ?(v, [ans, v].min()) end if end for do cui@print("\{ans}\n") end func