Help me in solving AOCV210 problem

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

My code

// Update the code below to solve the problem

#include <bits/stdc++.h>
using namespace std;

int main() 
{
	int t;
    cin >> t;
	
	while(t--)
    	{
	    int N;
	    cin >> N;
	    int A[N];
	    int weekend=8;
	    for(int i=0; i < N; i++)
	    {
	        cin >> A[i];
	        if(A[i]%7 !=6 && A[i]%7 !=0)
	        {
	            Weekend++;
	        }
	    }
	    cout<<Weekend<<endl;
	}
	
}

My issue

// Update the code below to solve the problem

#include <bits/stdc++.h>
using namespace std;

int main()
{
int t,n,i,count;
cin >> t;

while(t--)
{
    count=0;
    
    cin>>n;
    
    int holidays[n];
    
    for(i=0;i<n;i++)
    {
        cin>>holidays[i];
    }
   
   for(i=0;i<n;i++)
   {
       if(holidays[i]%7!=0 and holidays[i]%7!=6)
       {
           count++;
       }
   }
    
   cout<<count+8<<endl;
}

}

Try this code.

whats the issue in your code??