n = int(input()) numList = list(map(int, input().split())) numList = sorted(numList) ret = null for i in range(n): if (i == n - 1): break elif (numList[i] - numList[i + 1]): continue val = abs(numList[i] - numList[i + 1]) print("min =") print(ret) if i == 0: # 初回の場合 無条件で最小値を代入 ret = val continue; elif ret > abs(val): ret = val if ret == null: ret = 0 print(ret)