CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #759 #761 →

#760. The two closest numbers

Find the smallest absolute difference between two elements at different positions (n ≥ 2). ### Input The first line has n, the second line has n integers separated by spaces. ### Output A number.

Examples

Input
5
-80 73 -100 -42 -57
Output
15
Input
2
-10 -44
Output
34

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!