package main import . "fmt" import . "slices" func main() { var n int Scan(&n) x:=make([]int,n) for i:=range x { Scan(&x[i]) } Sort(x) x=Compact(x) if len(x)<2 { Println(0) return } for i,v:=range x[1:] { x[i]=v-x[i] } Println(Min(x)) }