【leetcode❤python】 190. Reverse Bits
#-*- coding: UTF-8 -*-
class Solution:
# @param n, an integer
# @return an integer
def reverseBits(self, n):
tmp=str(bin(n))[2:][::-1]
for i in xrange(32-len(tmp)):
tmp+='0'
return int(tmp,base=2)
sol=Solution()
print sol.reverseBits(43261596)