#!/bin/python3 import sys n = int(input().strip()) a = list(map(int, input().strip().split(' '))) # your code goes here a.sort() mini = abs(a[0]-a[1]) for i in range(len(a)-1): x = abs(a[i]-a[i+1]) if x < mini: mini = x print(x)