Skip to content

Commit f295496

Browse files
committed
179 is good enough
1 parent 2595547 commit f295496

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

2025/day06/p2-golf.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
set -f;mapfile -t a;for((h=${#a[@]}-1;r<${#a};++r))
2+
do n=${a[h]:r:2};$n||o=$_;${n:1}||o=_;for((c=0;c<h;))
3+
do printf ${a[c++]:r:1};done;printf $o
4+
done|sed 's=. *_=+=g;s=$=0\n='|bc

0 commit comments

Comments
 (0)