2393 . 综合题

阅读程序【CSP 2023 提高级第一轮1】

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

1 . (判断题)

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

2 . (判断题)

f 函数的输入参数的类型改为 unsigned int,程序的输出不变。()

3 . (判断题)

当输入为 65535 时,输出为 63。()

4 . (判断题)

当输入为 1 时,输出为 64。()

5 . (单选题)

当输入为 512 时,输出为()。

6 . (单选题)

当输入为 64 时,执行完第 5 行后 x 的值为()。