#C6902. Weekly Hours Report
Weekly Hours Report
Weekly Hours Report
You are given the daily working hours for each employee over a week. Each employee's record consists of exactly 7 integers corresponding to the hours worked from Monday to Sunday. Your task is to compute the total number of hours each employee worked during the week.
The total hours for an employee is computed as follows:
\( \text{Total Hours} = \sum_{j=1}^{7} a_j \)
where \( a_j \) represents the hours worked on the jth day.
inputFormat
The first line of the input contains a single integer \( T \) representing the number of employees. This is followed by \( T \) lines, each containing exactly 7 space-separated integers. Each integer represents the hours worked on each day of the week (from Monday to Sunday) for one employee.
Input Format:
T hours_1 hours_2 hours_3 hours_4 hours_5 hours_6 hours_7 ... (repeated T times)
outputFormat
Output a single line containing \( T \) space-separated integers where each integer is the total number of hours worked by the corresponding employee during the week.
Output Format:
total_1 total_2 ... total_T## sample
3
8 8 8 8 8 0 0
10 10 10 10 0 0 10
5 5 5 5 5 5 5
40 50 35