package com.yf;
public class Day02 {
public static void OddNumber(int[] arr) {
int eor = 0;
for(int number:arr) {
eor = eor ^ number;
}
int rightOne = eor&(~eor+1);//得到最右边的那个1
int onlyOne = 0;
for(int i:arr) {
if((i&rightOne)==0) {
onlyOne = onlyOne^i;
}
}
System.out.println(onlyOne+" "+(eor^onlyOne));
}
public static void main(String[] args) {
int[] arr = {1,1,2,2,3,3,3,4,4,5,5,5};
OddNumber(arr);
}
}