class Solution {
public:
int xorOperation(int n, int start) {
int nret = start;
for (int m = 1; m < n; m++) {
nret = nret ^ (start + 2 * m);
}
return nret;
}
};
class Solution {
public:
int xorOperation(int n, int start) {
int nret = start;
for (int m = 1; m < n; m++) {
nret = nret ^ (start + 2 * m);
}
return nret;
}
};