Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(raw_input())
- spacing = len(bin(n)[2:])
- for i in range(1,n+1):
- print str(i).rjust(spacing, ' '),str(oct(i)[1:]).rjust(spacing, ' '),str(hex(i)[2:].upper()).rjust(spacing, ' '),str(bin(i)[2:]).rjust(spacing, ' ')
Add Comment
Please, Sign In to add comment