repeated permutation by pooq

input""a,b
for i=0to a^b-1n=i
r$=""
s$=""
for j=1to b
r$=str$(mod(n,a)+1)+s$+r$
s$=" "
n=int(n/a)next
?r$next

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

download

return to the top page