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