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