View Code of Problem 3929

#define _CRT_SECURE_NO_WARNINGS
#include<bits/stdc++.h>
using namespace std;
int main()
{

	int t;
	cin >> t;
	while (t--) {
	
		int n;
		cin >> n;
		int sum = 0;
		for (int i = 0; i < n; i++) {
			int temp;
			cin >> temp;
			sum ^= temp;
		}
		cout << sum << endl;
		

	}

	return 0;
}

Double click to view unformatted code.


Back to problem 3929