Help me in solving AOCP10 problem

My issue

My code

// Update the code below to solve the problem

#include <stdio.h>

int main() {
    int t;
    scanf("%d", &t);
    int sum=8;
    for (int i = 0; i < t; i++) {
        int n;
        scanf("%d", &n);
        int A[n];
        for (int j = 0; j < n; j++) {
            scanf("%d", &A[j]);
          }
          int holiday[8]={6,7,13,14,20,21,27,28};
          for(int N=0;N<n;N++)
          {
          for(int k=0;k<8;k++)
          {
              if(A[N]==holiday[k])
              {
                  break;
              }
              else
              {
                  sum++;
              }
          }}
          
        printf("%d\n",sum);
        }
        return 0;
}
      

Learning course: C for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone

@anjalisoni2001
few implementations mistakes were there
i have corrected it in your code.

#include <stdio.h>

int main() {
    int t;
    scanf("%d", &t);
    int sum=8;
    for (int i = 0; i < t; i++) {
        sum=8;
        int n;
        scanf("%d", &n);
        int A[n];
        for (int j = 0; j < n; j++) {
            scanf("%d", &A[j]);
          }
          int holiday[8]={6,7,13,14,20,21,27,28};
          for(int N=0;N<n;N++)
          {
              int ch=0;
          for(int k=0;k<8;k++)
          {
              if(A[N]==holiday[k])
              {
                  ch=1;
                  break;
              }
              
          }
              if(!ch)
              sum++;
          }
          
        printf("%d\n",sum);
        }
        return 0;
}