A24026. #include <iostream> using namespace std; unsigned short f(unsigned short x) { x ^= x << 6; x ^= x >> 8; return x; } int main() { unsigned short x; cin >> x; unsigned short y = f(x); cout << y << endl…
判断题
中等
知识点
题目描述
#include <iostream>
using namespace std;
unsigned short f(unsigned short x) {
x ^= x << 6;
x ^= x >> 8;
return x;
}
int main() {
unsigned short x;
cin >> x;
unsigned short y = f(x);
cout << y << endl;
return 0;
}假设输入的 x 是不超过 65535 的自然数,完成下面的判断题和单选题:
当输入非零时,输出一定不为零。( )
选项(单选)
答案解析
详细答案解析为会员权益,按每日次数查看。
开通 / 升级会员
上一题
下一题