Factoradic Encoder by aglias

#!ruby -n
i=k=1
k*=i+=1until k>n=$_.to_i
i.downto(2){|j|$><<n/k/=j;n%=k}
p 0

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

download

return to the top page