Skip to content

Instantly share code, notes, and snippets.

View haakonvt's full-sized avatar
💢

Håkon V. Treider haakonvt

💢
View GitHub Profile
@haakonvt
haakonvt / aoc2023_day15.py
Created December 15, 2023 11:30
AOC 2023, day 15
import math
from functools import reduce
from itertools import count, repeat
def reindeer(s):
return reduce(lambda i,c: (17*(i+ord(c)))%256, s, 0)
# Solution, part 1:
sum(map(reindeer, inp.split(",")))