ON bit fixed by pooq

input""a,b
f(a,b,0)
sub f(n,r,x)if!r?right$("000"+bin$(x),a):return
if n=r?right$("000"+bin$(x+2^r-1),a):return
f(n-1,r,x)
f(n-1,r-1,x+2^(n-1))end sub

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

download

return to the top page