AoC 2022, day 10

Run Settings
LanguageRaku
Language Version
Run Command
my @mem = 1; for $*IN.lines».words -> @ins { @mem.push(@mem.tail); @mem.push(@mem.tail + @ins[1].Int) if @ins[0] eq 'addx'; } my @ndx = 19, 59 ... 219; put 'part 1: ', @ndx.map({ @mem[$_] * ($_ + 1) }).sum; put "part 2: \n", (^6).map(-> \row { (^40).map(-> \col { abs(col - @mem[row * 40 + col]) ≤ 1 ?? '#' !! ' ' }).join }).join("\n");
Editor Settings
Theme
Key bindings
Full width
Lines