#C7249. Employee with Maximum Working Hours
Employee with Maximum Working Hours
Employee with Maximum Working Hours
Given the number of employees and their work hours for a week, your task is to determine the employee whose total working hours are the highest. Each employee's record is provided as a line of text containing an employee ID followed by 7 integers representing the number of hours worked each day from Monday to Sunday.
If more than one employee has the same highest total working hours, output the employee who appears first in the input.
You need to read data from standard input and write the result to standard output.
inputFormat
The first line contains an integer n representing the number of employees. Each of the following n lines contains an employee record in the following format:
ID h1 h2 h3 h4 h5 h6 h7
Here, ID
is a string (without any spaces) denoting the employee's ID, and h1 ... h7
are integers representing the number of hours worked on each day of the week, from Monday to Sunday.
outputFormat
Output a single line containing the employee ID that has the highest total working hours. If there is a tie, output the ID of the employee who appears first in the input.
## sample1
A123 8 8 8 8 8 0 0
A123
</p>