Collatz Problem by %20

p
:
s/[1-9]/&=/g
y/123456789/012345678/
t
s/==/-/g
s/=0/0-----/g
/=/s/-/=--/g
s/=/----/g
:0
s/-/<<123456789-01>/
s/^0\B\|\(.\)<.*\1\(-*.\).*>/\2/
t0
p
/^1$/Q
b

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page