View Code of Problem 3929

#include <bits/stdc++.h>
using namespace std;

int main() {
	int  t;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		int a;
		cin >> a;
		int result = a;
		while (--n) {
			cin >> a;
			result ^= a;
		}
		cout << result << endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3929