package sort;
import java.util.Arrays;
public class Test56_2 {
public static void main(String[] args) {
int[]e={3,3,3,4};
System.out.println(getn(e));
}
public static int getn(int[] s) {
int[] store = new int[32];
for (int i = 0; i < store.length; i++) {
store[i] = 0;
}
for (int i = 0; i < s.length; i++) {
System.out.println(s[i]);
int mask = 1;
for (int j = 31; j >= 0; j--) {
store[j] += s[i] & mask;
mask = mask << 1;
}
}
System.out.println(Arrays.toString(store));
int result = 0;
int base = 1;
for (int i = 31; i >= 1; i--) {
if ((store[i] %3) != 0)
result += base;
System.out.println("result"+result);
base = base << 1;
}
return result;
}
}