LearnPy Hub
← Arena
EasyRating 1000

Closest Values

Print the minimum absolute difference between any two elements.

Input

n ≥ 2, then n integers.

Output

A number.

Sample 1

Input
4
4 2 1 3
Output
1

Sample 2

Input
2
10 -10
Output
20
solution.py
Output appears here
Closest Values · Python Arena problem · LearnPy Hub