题库练习 2023年CSP-S1阅读程序题1:01 #include <iostream>

A62007 | 2023年CSP-S1阅读程序题1:01 #include <iostream>

来源2023年
时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

2023年CSP-S1阅读程序题1:

01 #include <iostream>
02 using namespace std;
03
04 unsigned short f(unsigned short x){
05 x ^= x << 6;
06 x ^= x >>8;
07 return x;
08}
09
10 int main(){
11 unsigned short x;
12 cin >> x;
13 unsigned short y = f(x);
14 cout << y <<endl;
15 return 0;
16}

假设输入的x是不超过65535的自然数,完成下面的判断题和单选题:

C++ 编辑器
输入
输出