int[] list;
int n, value;
input n;
list = new int[n];
for (int i = 0; i < n; i++) {
input value;
list[i] = value;
}
int m = 0;
for (int i = 0; i < n; i++) {
for (int j = i+1, j < n; j++) {
int d = Math.abs(list[j] - list[i]);
if (m > d)
m = d;
}
}
output m;
please provide some details,Thanks very much