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