summaryrefslogtreecommitdiffstats
path: root/1.py
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2022-12-07 12:57:36 +0000
committerTomasz Kramkowski <tomasz@kramkow.ski>2022-12-07 12:57:36 +0000
commitd9a97e9bf28cf91f1a7e57f1298b7c742e25ed56 (patch)
tree999464f801480565733c5223b020b2d762140b00 /1.py
downloadaoc2022-d9a97e9bf28cf91f1a7e57f1298b7c742e25ed56.tar.gz
aoc2022-d9a97e9bf28cf91f1a7e57f1298b7c742e25ed56.tar.xz
aoc2022-d9a97e9bf28cf91f1a7e57f1298b7c742e25ed56.zip
days 1-7
Diffstat (limited to '1.py')
-rw-r--r--1.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/1.py b/1.py
new file mode 100644
index 0000000..54a243b
--- /dev/null
+++ b/1.py
@@ -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:]))