Write the whole number n as exactly 32 binary digits (add zeros on the left if needed). Reverse the order of these 32 digits, and return the number that the new digits make.
The judge gives n as a normal number, and expects a normal number back.
Examples
Example 1:
Input: n = 7
Output: 3758096384
Explanation: In 32 bits, 7 is 00000000000000000000000000000111. Reversed, it is 11100000000000000000000000000000, which is 3758096384.
Example 2:
Input: n = 6
Output: 1610612736
Explanation: In 32 bits, 6 is 00000000000000000000000000000110. Reversed, it is 01100000000000000000000000000000, which is 1610612736.
Example 3:
Input: n = 3221225472
Output: 3
Explanation: In 32 bits this is two 1s followed by thirty 0s. Reversed, it is thirty 0s followed by two 1s, which is 3.