Weapon Value Help

I can’t figure out what’s wrong with my code as it runs and prints the desired output but fails all tests when I try to submit.

#include <stdio.h>

int main(void) {
int t, num;

scanf("%d\n", &t);

for(int n = 0; n<t; n++){
    scanf("%d\n", &num);
    char lol[num][10];
    for(int i = 0; i<num; i++){
    int count = 0;
    for(int j = 0; j<10; j++){
        int temp = 0;
        for(int i = 0; i<num; i++){
            temp += (int)lol[i][j]-48;
        if(temp>0 && temp%2==1){
    printf("%d\n", count);
return 0;


Take bitwise XOR corresponding to each index for all the contestants and finally find the number of 1’s in the final result.