我的输入是 int,预期输出必须是 int,我可以看到我们正在交换相邻位。
int swapAdjacentFourBitGroups(int input) { return ((input << 4) & 0xf0f0f0f0) | ((input >> 4) & 0x0f0f0f0f); }