CodeLab Academy 📞 9936 6696
← List Python · Level 7: Lists Code · 70 points ← #638 #640 →

#639. Differences of neighbors

Print the difference of every two neighboring elements (a[i+1] - a[i]). ### Input The first line has n, the second line has n integers separated by spaces. (n ≥ 2) ### Output n-1 numbers.

Examples

Input
9
45 40 -29 -42 -9 -41 38 50 3
Output
-5 -69 -13 33 -32 79 12 -47
Input
5
44 -8 10 -32 -42
Output
-52 18 -42 -10

💡 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!