17 lines
472 B
Text
17 lines
472 B
Text
}:l:> Start loop, enqueue Z (initially 0).
|
|
}:o: Treat the queue as a stack and
|
|
<:8:= accumulate the octal digits
|
|
/=>&~ of the current number.
|
|
^:o:
|
|
|
|
<:0:- Get a sentinel negative 1.
|
|
&>@ Enqueue it between the digits and the current number.
|
|
{ Dequeue the first octal digit.
|
|
|
|
}:p:
|
|
~%={+ Rotate each octal digit into place and print it.
|
|
^:p:
|
|
|
|
<:a:~$ Output a newline.
|
|
<:1:x{+ Dequeue the current number and increment it.
|
|
^:l:
|