Derangements by tails

s;i;j;main(k){for(;--k||(s-127||printf("%o\n",i),k=6,s=(j=++i)<3e5);j/=8)s|=(j%8!=k)<<j%8;}

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

download

return to the top page