For a hackathon, your team is building an app that tracks the user's spending on bubble tea throughout the month! (In order to improve the financial literacy of high school students, supposedly.)
The user of your app makes
After each purchase, your program must calculate the total the user has spent on bubble tea up until that point.
Constraints
Input Specification
The first line contains a single integer,
The next
Output Specification
Output
Sample Input
3
1
2
3
Sample Output
1
3
6
Explanation
The user makes
After the first purchase, the user has spent
After the second purchase, the user has spent
After the third purchase, the user has spent
Comments