#P1100. 高低位交换
高低位交换
Description
You are given a non-negative integer less than . This number can be represented as a 32-bit binary number (pad with leading zeros if it has fewer than 32 bits). We call the first 16 bits the high 16 bits, and the last 16 bits the low 16 bits. Swap its high and low 16 bits to obtain a new number. What is this new number (in decimal)?
For example, the number is represented in binary as (with leading zeros added to make it 32 bits), where the high 16 bits are , and the low 16 bits are . After swapping the high and low bits, we get a new binary number . This is in decimal.
Input Format
A non-negative integer less than .
Output Format
Output the new number.
1314520
249036820
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号