#include<stdio.h>
int main(){
int n,m,s;
while(scanf("%d",&n),n) {
s=0;
while(n--) {
scanf("%d",&m);
s^=m;
}
printf("%d\n",s);
}
return 0;
}
hdu 1563简单异或Find your present!
最新推荐文章于 2019-08-22 21:55:27 发布
#include<stdio.h>
int main(){
int n,m,s;
while(scanf("%d",&n),n) {
s=0;
while(n--) {
scanf("%d",&m);
s^=m;
}
printf("%d\n",s);
}
return 0;
}