PnnK

10->16

Sep 21st, 2021
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. n = int(input())
  2. alp = '0123456789ABCDEFGH'
  3. n_16 = ''
  4. while n>0:
  5.     n_16 += str(alp[n % 16])
  6.     n = n//16
  7. print(n_16[::-1])
  8.  
Advertisement
Add Comment
Please, Sign In to add comment