package main import ( "fmt" "math" ) func abs(a int) int { return int(math.Abs(float64(a))) } func min(a, b int) int { return int(math.Min(float64(a), float64(b))) } func resolve(N int, X []int) int { ret := 1000000 for i := 0; i < N-1; i++ { ret = min(ret, abs(X[i]-X[i+1])) } return ret } func main() { var N int fmt.Scanf("%d\n", &N) X := make([]int, N) for i := 0; i < N; i++ { fmt.Scanf("%d", &X[i]) } fmt.Println(resolve(N, X)) }