Skip to content

Instantly share code, notes, and snippets.

@dmitryTsatsarin
Created February 2, 2020 18:54
Show Gist options
  • Save dmitryTsatsarin/87967004329bd966fba681b1ef1909b3 to your computer and use it in GitHub Desktop.
Save dmitryTsatsarin/87967004329bd966fba681b1ef1909b3 to your computer and use it in GitHub Desktop.
import sys
a = int(sys.argv[1])
s = bin(a)[2:]
reverse = s[::-1]
print('Result is %s' % int(reverse, 2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment