View Code of Problem 3929

#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#define N 100
using namespace std;
int main()
{
	int t;
	scanf("%d",&t);
	while(t--){
	    int n;
	    scanf("%d",&n);
	    int str[n];
	    for(int i=0;i<n;i++){
	        scanf("%d",&str[i]);
	    }
	    int ans=0;
	    for(int i=0;i<n;i++){
	        ans^=str[i];
	    }
	    printf("%d\n",ans);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3929