Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = int(input())
- n = ''
- l = 0
- if x == 0:
- print(0)
- else:
- while x > 0:
- y = str(x%2)
- z = int(x%2)
- n = y + n
- x = int(x-z)
- x = int(x/2)
- l = 1
- if l == 1:
- print(n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement