mirror of
https://github.com/danbulant/adventOfCode
synced 2026-05-21 21:28:48 +00:00
19 lines
No EOL
349 B
Python
19 lines
No EOL
349 B
Python
|
|
content = ""
|
|
|
|
for line in open("./input2"):
|
|
content += line.strip()
|
|
|
|
values = []
|
|
for part in line.split(","):
|
|
currentValue = 0
|
|
for letter in part:
|
|
asciiValue = ord(letter)
|
|
currentValue += asciiValue
|
|
currentValue *= 17
|
|
currentValue %= 256
|
|
|
|
values.append(currentValue)
|
|
|
|
print(values)
|
|
print(sum(values)) |