若将第 12~14 行(为 a[32] 到 a[43] 补 0 的循环)删除,会改变程序输出结果。( )
#include <iostream>
#include <cstring>
using namespace std;
string s;
int a[100];
int gen[13] = {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1};
int main() {
cin >> s;
for (int i = 0; i < 32; ++i) {
a[i] = s[i] - '0';
}
for (int i = 32; i < 44; ++i) {
a[i] = 0;
}
for (int i = 0; i < 32; ++i) {
if (a[i] == 0) continue;
for (int j = 0; j < 13; ++j) {
a[i + j] ^= gen[j];
}
}
for (int i = 32; i < 44; ++i) {
cout << a[i];
}
cout << endl;
return 0;
}
正确
错误