blob: 54a243bc545ec020a813001c5aeb6f11f61d1332 (
plain)
1
2
|
print(max(sum(int(n) for n in group.split('\n')) for group in open('1.in').read().rstrip().split('\n\n')))
print(sum(sorted(sum(int(n) for n in group.split('\n')) for group in open('1.in').read().rstrip().split('\n\n'))[-3:]))
|