Help me in solving OPMIN problem

My issue

Program was not executed

My code

#include <stdio.h>
#define MAX_N 100
int min(int a, int b) {
    return (a < b) ? a : b;
}
int main() {
    int t, n, a[MAX_N];
    scanf("%d", &t);

    while (t--) {
        int n;
        scanf("%d", &n);
        int a[n];

        for (int i = 0; i < n; i++) {
            scanf("%d", &a[i]);
        }
        int minimum = a[0];
        for(int i = 1; i < n; i++) {
            minimum = min(a[i], minimum);
        }
        int count = 0;
        for(int i = 1; i < n; i++) {
            if (a[i] == minimum) count++;
        }
        printf("%d\n", n - count);
    }

    return 0;
}

Learning course: Data Structures & Algorithms using C
Problem Link: https://www.codechef.com/learn/course/ciet-data-structures-c/CIETDSC02/problems/OPMIN