Files
AOC/2025/day01/part1.py
2025-12-01 12:36:26 +01:00

17 lines
259 B
Python

text: str
with open("input.txt") as f:
text = f.read()
total: int = 0
nb: int = 50
text = text.replace("L", "-").replace("R", "+")
for line in text.splitlines():
nb = (nb + int(line)) % 100
if nb == 0:
total += 1
print(total)