summary refs log tree commit diff
path: root/22.1/main.py
blob: 26a77275ee020ebc410fa6421eea3daf05dcab2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from sys import stdin

best = []
done = False
while not done:
    done = True
    total = 0
    for line in stdin:
        done = False
        line = line.strip()
        if line == "": break
        total += int(line)
    best = sorted([total] + best)[-3:]
print(best[-1], sum(best))