#include <stdio.h>
int main(){
int n, t, x;
while(scanf("%d", &n) == 1){
x = 0;
while(n--){
scanf("%d", &t);
x ^= t;
}
printf("%d\n", x);
}
return 0;
}
转载于:https://www.cnblogs.com/changmu/p/3639707.html
#include <stdio.h>
int main(){
int n, t, x;
while(scanf("%d", &n) == 1){
x = 0;
while(n--){
scanf("%d", &t);
x ^= t;
}
printf("%d\n", x);
}
return 0;
}
转载于:https://www.cnblogs.com/changmu/p/3639707.html