1234567891011121314151617 |
- input = [[]]
- for line in open("1.input").readlines():
- if line.strip() == "":
- input.append([])
- else:
- input[-1].append(int(line))
- elves = [sum(elf) for elf in input]
- task1 = max(elves)
- print(task1)
- task2 = sum(sorted(elves)[-3:])
- print(task2)
|