aoc2023/d15/part1.py

13 lines
172 B
Python
Raw Normal View History

2023-12-15 16:24:51 +00:00
import sys
S=0
for l in sys.stdin.read().split(','):
c = 0
for w in l:
c += ord(w)
c *= 17
c = c % 256
print(l, c)
S += c
print(S)