思路:使用掩码运算得到的高16位与低16位取或
#include <bits/stdc++.h>
using namespace std;
int main()
{
unsigned n;cin>>n;
cout<<((n&0x0000ffff)<<16|(n&0xffff0000)>>16)<<endl;
system("pause");
return 0;
}
思路:使用掩码运算得到的高16位与低16位取或
#include <bits/stdc++.h>
using namespace std;
int main()
{
unsigned n;cin>>n;
cout<<((n&0x0000ffff)<<16|(n&0xffff0000)>>16)<<endl;
system("pause");
return 0;
}