Help me in solving MISSP problem

The code is running on custom input, but not getting submitted.

My code

#include <stdio.h>

int main() {
	// your code goes here
	int t;
	int temp;
	int n[10];
	int num[100000];
	scanf("%d", &t);
    int counter;
    for(int i = 0; i < t; i++){
        scanf("%d", &n[i]);
        getchar();
        for(int j = 0; j < n[i]; j++){
            scanf("%d", &num[j]);
            getchar();
        }
        int k;
        for(k = 0; k < n[i]; k++){
	        for(int j = 0; j < n[i]; j++){
				if(j == k){
					continue;
				}
                if(num[j] == num[k]){
                    counter = 1;
					break;
                }
				else{
					counter = 0;
				}
            }
            if(counter == 0){
               printf("%d\n", num[k]);
            }
        }
    }
	return 0;
}

Problem Link: MISSP Problem - CodeChef