diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2022-12-07 12:57:36 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2022-12-07 12:57:36 +0000 |
commit | d9a97e9bf28cf91f1a7e57f1298b7c742e25ed56 (patch) | |
tree | 999464f801480565733c5223b020b2d762140b00 /1.py | |
download | aoc2022-d9a97e9bf28cf91f1a7e57f1298b7c742e25ed56.tar.gz aoc2022-d9a97e9bf28cf91f1a7e57f1298b7c742e25ed56.tar.xz aoc2022-d9a97e9bf28cf91f1a7e57f1298b7c742e25ed56.zip |
days 1-7
Diffstat (limited to '1.py')
-rw-r--r-- | 1.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -0,0 +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:])) |