diff options
Diffstat (limited to '22.1/main.py')
-rw-r--r-- | 22.1/main.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/22.1/main.py b/22.1/main.py new file mode 100644 index 0000000..26a7727 --- /dev/null +++ b/22.1/main.py @@ -0,0 +1,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)) |