import java.util.Arrays; import java.util.Scanner; public class MinAbsoluteDifference { public static void main(String[] args) throws Exception { Scanner scan = new Scanner(System.in); long a[] = new long[scan.nextInt()]; for(int i= 0 ; i < a.length ;i++) { a[i] = scan.nextInt(); } Arrays.sort(a); long diff = Long.MAX_VALUE; for(int i = 1 ; i < a.length ;i++) { diff = Math.min(diff, Math.abs(a[i] - a[i -1])); } System.out.println(diff); } }