#K38387. Busiest Minute
Busiest Minute
Busiest Minute
You are given a series of login timestamps in the format \(hh:mm:ss\). Your task is to determine the busiest minute, i.e., the minute with the highest number of logins. In case of a tie, output the earliest minute (in lexicographical order, which corresponds to the chronological order).
The result should be printed in the format \(hh:mm\) along with the count of logins during that minute. For example, if the login timestamps are 13:45:30
, 13:46:00
, 13:46:30
, 13:47:00
and 13:47:30
, then the busiest minute is 13:46
with 2 logins.
inputFormat
The first line contains an integer (n) which denotes the number of login entries. Each of the next (n) lines contains a login timestamp in the format hh:mm:ss
.
outputFormat
Output a single line containing the busiest minute in the format hh:mm
followed by a space and then the number of logins during that minute.## sample
1
12:30:00
12:30 1
</p>