难度:easy
Reverse bits of a given 32 bits unsigned integer.
For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 00111001011110000010100101000000).
思路:
1. 此题是将十进制数转为为二进制,再将二进制数倒置,输出其十进制数,题目不难,但是对初学者有几个小陷阱。
2. bin()函数是将整数转化为string,输出为string不是整数
3. 补全32位-----补在后面