diff --git a/2025/day01/part1.py b/2025/day01/part1.py new file mode 100644 index 0000000..40a8bb1 --- /dev/null +++ b/2025/day01/part1.py @@ -0,0 +1,17 @@ +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) \ No newline at end of file