KateWilson

Калькулятор сс

Jun 15th, 2021
821
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Перевод в любую систему счисления
  2. alp = '0123456789ABCDEFGH'
  3. x = int(input())
  4. n = int(input())
  5. s = ''
  6. while x > 0:
  7.     s = alp[x % n] + s
  8.     x = x // n
  9. print(s)
RAW Paste Data