day 1 part 1

This commit is contained in:
magical 2025-12-02 02:06:21 +00:00
parent 445d855a9c
commit 97bbeebeb0
3 changed files with 4200 additions and 0 deletions

4177
day01/input Normal file

File diff suppressed because it is too large Load Diff

10
day01/sample Normal file
View File

@ -0,0 +1,10 @@
L68
L30
R48
L5
R60
L55
L1
L99
R14
L82

13
day01/sol.py Normal file
View File

@ -0,0 +1,13 @@
input = open("input")
t = 0
dial = 50
for line in input:
line = line.strip().replace("L","-").replace("R","")
n = int(line)
dial += n
dial %= 100
if dial == 0:
t += 1
print(t)