/**
* @param {number[]} nums
* @return {number[]}
*/
var findNumsAppearOnce = function(nums) {
let xy = 0;
nums.forEach( (value, index) => {
xy ^= value;
});
// console.log(xy);
// console.log(xy.toString(2));
let k = 0;
while(!(xy >> k & 1)) k ++; // 如果第k位为0 k++
let X = 0;
nums.forEach( (value, index) => {
if(value >> k & 1){
X ^= value;
}
});
let Y = 0;
Y = xy ^ X;
return [X, Y];
};