Help me in solving MISSP problem

My issue

All my output is correct but when I want to submit the answer It shows that there is a wrong answer

My code

import java.util.*;
import java.lang.*;
import java.io.*;

class Codechef
{
  
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		for(int i=1; i<=t; i++){
		    int size = sc.nextInt();
		    int arr[] = new int[size];
		    for(int j=0; j<arr.length; j++){
		        arr[j] = sc.nextInt();
		    }
		    
		    Arrays.sort(arr);
		    for(int m=0; m<arr.length; m++){
		        int count=0;
		        for(int n=0; n<arr.length; n++){
		            if(arr[n]==arr[m]){
		                count++;
		            }
		        }
		        if(count<2){
		            System.out.println(arr[m]);
		            break;
		        }
		    }
		}
		

	}
}

Learning course: Arrays, Strings & Sorting
Problem Link: Chef and Dolls Practice Problem in - CodeChef

@pranabgiri
the logic is calculate the xor of the whole array.