fork download
  1. f=lambda n,k=8:k*'_'and f(n/2,k-1)+'CBAD'[n>>7&2|n&1]
  2.  
  3. for n in (14234, 38513, 0, 120, 65535, 39253):
  4. print n
  5. print f(n)
  6. print
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
14234
BCADBADA

38513
ABBDCAAB

0
CCCCCCCC

120
CBBBBCCC

65535
DDDDDDDD

39253
ABCDABCD