Skip to content

Commit 748025d

Browse files
committed
Finalized day 2
1 parent e08678f commit 748025d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

aoc/2025/02/normal/02_normal.vn.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
f.readlines()[0].strip().split(","))
1212
)
1313

14-
1514
res1 = 0
1615
res2 = 0
1716
for l, r in tqdm(inp):
@@ -22,10 +21,9 @@
2221
if s1 == s2:
2322
res1 += n
2423

25-
for p in range(1, len(s)//2 + 3):
24+
for p in range(1, len(s)//2 + 1):
2625
if s == s[:p] * (len(s) // p):
2726
res2 += n * (p != len(s))
2827
break
2928

30-
3129
print(res1, res2)

0 commit comments

Comments
 (0)