Skip to content

Commit e3ef504

Browse files
committed
Blog, 2025 Day 1: Add note about unnecessary check
1 parent 1249f84 commit e3ef504

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

blog/src/content/solutions/2025/01/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ do that when the left-hand side is considered false.
142142
Once we calculate this number and rotate the dial, we can do the logic for both
143143
Parts 1 and 2 at the same time! We can add 1 to a tally of `hits` if 0 is
144144
reached exactly, and we can use our formula from before to increase a tally of
145-
`passes`.
145+
`passes`.[^unnecessary-check]
146+
147+
[^unnecessary-check]: It turns out that checking `clicks >= clicks_to_next_zero`
148+
is unnecessary; if the condition is untrue (i.e. no passes occur), the formula
149+
will indeed evaluate to 0.
146150

147151
```py title="2025\day01\solution.py" ins={9-14,16}
148152
...

0 commit comments

Comments
 (0)