#K2691. Server with Maximum Uptime
Server with Maximum Uptime
Server with Maximum Uptime
Given a list of servers, each with a name and an uptime value, determine which server has the maximum uptime. In the event of multiple servers having the same maximum uptime, the server that appears first in the list should be chosen.
The problem is defined as follows: Given an integer \(n\) representing the number of servers, followed by \(n\) lines where each line contains a server name and an integer uptime (in seconds), output the server name with the maximum uptime.
inputFormat
The first line contains an integer \(n\) (with \(1 \leq n \leq 1000\)) representing the number of servers.
The next \(n\) lines each contain a server name (a string without spaces) and an integer \(T\) (the uptime in seconds), separated by a space.
outputFormat
Output the server name with the maximum uptime. In case of a tie, output the one that appears first in the input list.
## sample1
server-1 54000
server-1
</p>