Bad_Programist

Untitled

Oct 24th, 2018
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. a = int(input())
  2. i = int(input())
  3. c = ''
  4. while a > i:
  5.     c += str(a % i)
  6.     a = a // i
  7. c += '1'
  8. print(c[::-1])
Add Comment
Please, Sign In to add comment