Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- team_name = {}
- team_win = {}
- for i in range(n):
- a = input().split() #после input - забыл скобки ()
- team = a[0] + a[1] + a[2]
- if team not in team_name.keys():
- team_name[team] = a
- if team not in team_name.keys():
- team_name[team] = a
- if team not in team_name.keys():
- team_win[team] = 1
- else:
- team_win[team] += 1
- res = []
- for team in team_name.keys():
- item = []
- item.append(0)
- item.append(0)
- item[1] = team_win[team]
- item[2] = team_name[team]
- res.append(item)
- res = sorted(res)
- winner = res[len(res) - 1]
- winner_name = sorted(winner[1])
- print(winner_name, ":", winner[0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement