#include<stdio.h> int main() { int n; int tmp,x; while(scanf("%d",&n)!=EOF&&n!=0) { tmp=0; for(int i=0;i<n;i++) { scanf("%d",&x); tmp^=x; //printf("#%d\n",tmp); } printf("%d\n",tmp); } return 0; }
#include<stdio.h> int main() { int n; int tmp,x; while(scanf("%d",&n)!=EOF&&n!=0) { tmp=0; for(int i=0;i<n;i++) { scanf("%d",&x); tmp^=x; //printf("#%d\n",tmp); } printf("%d\n",tmp); } return 0; }