| CodeRams Practice Problem Archive |
|---|
| Finished |
You're trying to find the longest possible piece of music, so that you can play music non-stop. Given a list of songs and their durations (in MM:SS, with leading zeros), figure out which song is the longest.
The first line of input contains a positive integer $$$n$$$: the number of songs. The next $$$n$$$ lines contain a string, representing the song title, a space, and the song's duration, in MM:SS format with leading zeroes. (For example, a song that was 7 minutes and 9 seconds long would be written as 07:09).
Output a single string: the name of the longest song given in the input. If two songs have the same length, output the one that comes first in the input.
6 TheRobots 06:13 Spacelab 05:57 Metropolis 06:01 TheModel 03:41 NeonLights 08:53 TheManMachine 05:32
NeonLights
4 ReallyShortSong 01:30 ReallyLongSong 18:16 AnotherReallyLongSong 18:16 NotAsLongSong 11:01
ReallyLongSong
| Name |
|---|


