测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A27227. #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的自然数,完成下面的判断题和单选题:

当输入非零时,输出一定不为零。(    )

选项(单选)

上一题 下一题