Days 1 and 2

Day 2

removed input from day 1
This commit is contained in:
Simon Junod
2025-12-01 08:19:52 +01:00
commit 505cf65d33
5 changed files with 62 additions and 0 deletions

16
1/b.py Normal file
View File

@@ -0,0 +1,16 @@
with open("input", "r") as f:
lines = f.read().splitlines()
p = 50
for line in lines:
d = line[0]
n = int(line[1:])
for i in range(n):
if d == "R":
p += 1
else:
p -= 1
p %= 100
print(p)