17 lines
259 B
Python
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) |