Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from collections import defaultdict
- file = open("input.txt", "r", encoding="utf-8")
- max_scores = defaultdict(int)
- for line in file:
- class_number, score = map(int, line.split()[2:])
- max_scores[class_number] = max(max_scores[class_number], score)
- file.close()
- print(max_scores[9], max_scores[10], max_scores[11])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement