advent-of-code/2021/02/second.b98

5 lines
298 B
Text

v pos in 0,0, depth in 1,0, aim in 2,0
>00p10p20p>#;~:'f-#v_$&:00g+00p v@,a.*g01g00;
>'d-#v_$&20g+20pv>20g*10g+10pv
>&20g\-20p v <
^ ;,a.g01.g00; ~ << # we do not forget to strip the \n from the input