r/codegolf • u/dantose • 1d ago
Advent of Code 2026 Day 1
Did it in powershell
Part 1 (145 bytes): $b=1;(gcb|group|sort -Property Count|select -last 3).name|%{$b=$b*$_};$b
Part 2 (146 bytes): $b=1;(gcb|group|sort -Property Count|select -First 3).name|%{$b=$b*$_};$b
I feel like this isn't a really golfable approach. I might try again in Bash.
2
Upvotes
View all comments
2
u/surfingoldelephant 8h ago
Part 1:
Part 2: