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 :: 1000001 for i(1, N - 1) var v: int :: a[i] - a[i - 1] if(v <> 0) do ans :: [ans, v].min() end if end for if(ans = 1000001) do ans :: 0 end if do cui@print("\{ans}\n") end func