https://leetcode-cn.com/problems/xor-operation-in-an-array/
class Solution {
public int xorOperation(int n, int start) {
int res = 0;
for(int i = 0; i < n; i++){
res ^= start + i * 2;
}
return res;
}
}
标签:cn,int,res,start,异或,1486,数组
来源: https://www.cnblogs.com/realzhaijiayu/p/14738707.html