View Code of Problem 3929

#include "stdio.h"
#include "string.h"
 
int main(){
	int t,i,j,n,s,m;
	scanf("%d",&t);
	while(t--){
		scanf("%d",&n);
		s=0;
		for(i=0;i<n;i++){
			scanf("%d",&m);
			if(i==0)
				s+=m;
			else
				s=s^m;
		}
		printf("%d\n",s);
	}
}

Double click to view unformatted code.


Back to problem 3929