2
votes
Day 3
Today's problem description: https://adventofcode.com/2026/day/3
Please post your solutions in your own top-level comment. Here's a template you can copy-paste into your comment to format it nicely, with the code collapsed by default inside an expandable section with syntax highlighting (you can replace python with any of the "short names" listed in this page of supported languages):
<details>
<summary>Part 1</summary>
```python
Your code here.
```
</details>
Probably this could be optimized further, but it runs fast enough that I don't think I'll bother. My initial solution was an even slower version of the same approach that took several seconds to run. I'm not doing anything clever here, just bruteforcing all the possible squares and counting the valid ones. There's almost certainly a more elegant way to do this, but I couldn't think of it for whatever reason.
Solution (Lily)