Advertisement
fahimkamal63

Alone in couple

Jun 12th, 2019
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstdio>
  3. using namespace std;
  4.  
  5. int main(){
  6.     int t; scanf("%d", &t);
  7.     while(t--){
  8.         int n; scanf("%d", &n);
  9.         int a = 0, i;
  10.         for(i = 0; i < n; i++){
  11.             int k; scanf("%d", &k);
  12.             a ^= k;
  13.         }
  14.         cout << a << endl;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement