Completed day 17. Had to look at some other peoples stuff for guidance though

This commit is contained in:
Connor Johnstone
2023-12-17 01:43:55 -07:00
parent b7343dc6d5
commit 157d1f01b0
20 changed files with 2203 additions and 0 deletions

12
day_16/cheating.py Normal file
View File

@@ -0,0 +1,12 @@
l = [[int(i) for i in s.split()] for s in open('input.txt').read().split('\n') if s.strip()]
def n(l):
if sum(i != 0 for i in l) == 0:
return 0
m = []
for i in range(len(l)-1):
m.append(l[i+1]-l[i])
return l[-1] + n(m)
print([n(i) for i in l])
print(sum(n(i[::-1]) for i in l))