import strutils, sequtils, algorithm, math var n = readLine(stdin).parseInt x_seq = split(readLine(stdin), ' ').map(parseInt) min_v = high(int) x_seq = x_seq.deduplicate() x_seq.sort(cmp[int]) for i in countup(0, n - 2): min_v = min(min_v, abs(x_seq[i] - x_seq[i + 1])) echo(min_v)