fork download
  1. # 0JvQtdGJ0LXQvdC60L4=
  2. def dec_converter(val, base=16):
  3. digits = '0123456789ABCDEFGH'
  4. dig = list(digits)
  5. out = ''
  6.  
  7. if val == 0:
  8. return '0'
  9.  
  10.  
  11. while val > 0:
  12. val, zal = divmod(val, base)
  13. out = dig[zal] + out
  14. return out
  15.  
  16.  
  17. print(dec_converter(5000, 64))
Success #stdin #stdout 0.09s 14112KB
stdin
Standard input is empty
stdout
1E8