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

#638. Prefix sums

At position i, print the sum of the first i elements. ### Input The first line has n, the second line has n integers separated by spaces. ### Output One line.

Examples

Input
3
15 10 16
Output
15 25 41
Input
5
-10 -6 -15 20 10
Output
-10 -16 -31 -11 -1

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