Чжоу Цин ZenLeaders 15398
Александр Махов [528] ZenLeaders 4996
f1import timef1import time
22
3def sort_key(row):3def sort_key(row):
4    return [row[0], row[1][1], row[1][0], row[1][2]]4    return [row[0], row[1][1], row[1][0], row[1][2]]
n5s = input().split()n5inpt = input().split()
6lst = []6lst = []
n7while s:n7while inpt:
8    lst.append([time.strptime(s[-1], '%H:%M:%S'), [s[0], s[1], ' '.join(s[2:len(s) - 1]), s[-1]]])8    lst.append([time.strptime(inpt[-1], '%H:%M:%S'), [inpt[0], inpt[1], ' '.join(inpt[2:len(inpt) - 1]), inpt[-1]]])
9    s = input().split()9    inpt = input().split()
10lst.sort(reverse=False, key=sort_key)10lst.sort(reverse=False, key=sort_key)
11res = [lst[0][1]]11res = [lst[0][1]]
n12counter = 0n12cnt = 0
13index = 013idx = 0
14while index < len(lst) - 1 and counter < 3:14while idx < len(lst) - 1 and cnt < 3:
15    index += 115    idx += 1
16    if lst[index][0] != lst[index - 1][0]:16    if lst[idx][0] != lst[idx - 1][0]:
17        counter += 117        cnt += 1
18    if counter < 3:18    if cnt < 3:
19        res.append(lst[index][1])19        res.append(lst[idx][1])
20lens = [0] * len(res[0])20lengths = [0] * len(res[0])
21for row in res:21for row in res:
22    for i in range(len(row)):22    for i in range(len(row)):
n23        if len(row[i]) > lens[i]:n23        if len(row[i]) > lengths[i]:
24            lens[i] = len(row[i])24            lengths[i] = len(row[i])
25for row in res:25for row in res:
26    for i in range(len(row)):26    for i in range(len(row)):
t27        print('{:<{prec}}'.format(row[i], prec=lens[i]), end=' ')t27        print('{:<{prec}}'.format(row[i], prec=lengths[i]), end=' ')
28    print()28    print()
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op