#P272. 【例45.1】 高低位交换
【例45.1】 高低位交换
Description
Given a positive integer less than . This number can be represented as a 32-bit binary number (pad with leading zeros if necessary). The first 16 bits are called the "high bits", and the last 16 bits are called the "low bits". By swapping the high and low bits, we obtain a new number. What is this new number (in decimal)?
For example, the number in binary is 0000 0000 0001 0100 0000 1110 1101 1000 (with 11 leading zeros to make 32 bits). The first 16 bits are the high bits: 0000 0000 0001 0100; the last 16 bits are the low bits: 0000 1110 1101 1000. After swapping, we get 0000 1110 1101 1000 0000 0000 0001 0100, which is in decimal.
Input Format
A positive integer less than .
Output Format
An integer representing the number after swapping.
Sample
1314520249036820