2024 day 11

This commit is contained in:
Dimitri Lozeve 2024-12-11 18:38:45 +01:00
parent 1065943b0f
commit bea330905c
2 changed files with 17 additions and 0 deletions

16
2024/day11/day11.bqn Normal file
View file

@ -0,0 +1,16 @@
Split((-˜+`׬)=)
in•ParseFloat¨' 'Split ¯1•FChars"input"
h•HashMap
NumberOfDigits{1+10𝕩}
F{
𝕊0: 1;
nNumberOfDigits 𝕩
(1=2|n)𝕩÷10n÷2,(10n÷2)|𝕩,2024×𝕩
}
G{
0𝕊n: 1;
d𝕊n: {𝕊¯1: r+´(d-1)G¨F n dn h.Set r r ; 𝕩}¯1 h.Get dn
}
•Show +´25G¨in
•Show +´75G¨in

1
2024/day11/input Normal file
View file

@ -0,0 +1 @@
872027 227 18 9760 0 4 67716 9245696