407105: GYM102697 076 Jar of Candies

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

076. Jar of Candiestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Getting back from the grocery store, you bought a whole bag of candies just for you to eat. You put the candy in a jar, and hide it in your room. Unfortunately, you notice that the number of candies in the jar are going down each day, but you do not know by how much.

You want to know how much the thief has stolen every day.

Input

The first line $$$n$$$ will denote how much candy you had initially, and the second line will always contain a series of descending space-separated integers which indicate the amount of candy remaining each day, starting from the day the first candies were stolen.

Output

Output a set of line-separated integers which answers the amount of candy stolen from the candy jar each day.

ExampleInput
100
97 92 85 80 72 65
Output
3
5
7
5
8
7
Note

(It turns out that you caught your siblings stealing from your jar while you were absent from your room. Those rascals!)

加入题单

上一题 下一题 算法标签: