KateWilson

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

Jun 15th, 2021
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment