31 Oct Markham Saturday 14:00 Java Homework 20.10.24.
The Logging Company cuts a lot of trees. For management reasons, they want to produce a table of the total amount of wood cut every day. They have hired you, to help them produce the table. They’ve kept a log of trees logged, and they want you to produce a table from this data.
The first line will be the integer , representing the number of days in the log. The days will be numbered like this: .
There will be groups of lines. Each group will contain the data for day . The first line of each group contains the integer . The following lines will contain the mass of wood in each tree cut for that day. The mass will be a non-negative integer no more than .
You are to output
Day i: m for every day in the input, where is the sum of the mass of all trees cut that day. If there are no trees cut that day, you should output
Sample Input 1
5Sample Output 1
Day 1: 3
Day 2: 4
Day 3: 5Explanation for Sample Input 1 There are three days in the log. The first day contains three trees, one mass unit each. The second day contains two trees, two mass units each. The third day contains one tree, measuring five mass units. Sample Input 2
1 0Sample Output 2