#K53367. Smallest Absolute Difference
Smallest Absolute Difference
Smallest Absolute Difference
Given an array of integers, your task is to find the smallest absolute difference between any two distinct elements. In other words, for any two indices \(i\) and \(j\) with \(i < j\), compute \(|a_i - a_j|\) and return the minimum result.
If the array contains fewer than two elements, simply output 0.
inputFormat
The input consists of two lines. The first line contains an integer \(n\) representing the number of elements in the array. The second line contains \(n\) space-separated integers.
outputFormat
Output a single integer: the smallest absolute difference between any two distinct elements of the array.
## sample5
1 3 4 9 10
1