Skip to content

Instantly share code, notes, and snippets.

@avamsi
Created December 21, 2015 07:23
Show Gist options
  • Save avamsi/64e758c5e7ee9508bd53 to your computer and use it in GitHub Desktop.
Save avamsi/64e758c5e7ee9508bd53 to your computer and use it in GitHub Desktop.
n = int(raw_input())
width = len(bin(n)) - 2
for i in xrange(1, n + 1):
print '{n:{w}} {n:{w}o} {n:{w}X} {n:{w}b}'.format(n=i, w=width)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment