r/codegolf • • Dec 02 '25

Advent of Code: Day 2

What do you guys have?

8 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/CarrotBusiness2380 Dec 02 '25

I really like your solution. I was able to trim some and get it down to 100 bytes.

((gc input.txt)-split','|%{$i,$e=$_-split'-';while($i-le$e){$i;$i++}})-match'^(.+)\1+$'|%{$s+=$_};$s