#K11316. Find the Top User by Weekly Hours
Find the Top User by Weekly Hours
Find the Top User by Weekly Hours
You are given a list of users with their respective weekly hours watched over 7 days. The input starts with an integer \(N\) representing the number of users. For each user, two lines follow: the first line contains the user's ID (a string) and the second line contains 7 space-separated integers denoting the hours watched on each day.
Your task is to determine the user with the highest total hours watched. The total hours for a user is given by:
\( \text{total\_hours} = \sum_{i=1}^{7} h_i \)
If there are multiple users having the same maximum total hours, output the one that appears first in the input.
inputFormat
The first line of input contains an integer \(N\), representing the number of users. Each of the following 2\(N\) lines consists of:
- A line with the user ID (a string).
- A line with 7 space-separated integers representing the hours watched on each day.
You can assume each input is valid and that each user has exactly 7 numbers for the hours.
outputFormat
Output a single line containing the user ID of the user with the highest total hours watched.
## sample1
user1
2 3 1 4 0 5 3
user1