看穿了其实就是异或而已
// Problem#: 1200
// Author#: Reid Chan
#include <iostream>
using namespace std;
int main() {
int n;
while (cin >> n && n != 0) {
int result = 0;
int in;
for (int i = 0; i < n; ++i) {
cin >> in;
result ^= in;
}
cout << result << endl;
}
return 0;
}