Base 37 by Vigenere

import math,sys,string
for n in sys.stdin:
\x09s,n="",int(n);m=int(math.log(n,37))
\x09while m+1:c=37**m;d=n/c;s+=string.printable[d];n-=d*c;m-=1
\x09print s

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

download

return to the top page