Help me in solving AOCC10 problem

My issue

Why am I getting "wrong answer"?

My code

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

int main() 
{
	int t;
        cin >> t;
	
	while(t--)
	{
	    int N;
	    cin >> N;
	    int A[N], total_sat_sun=0, total_holiday=0;
	    for(int i=1; i <= N; i++)
	    {
	        cin >> A[i];
	    }
	    for(int i =1; i<=30; i++) // counting total saturday & sunday
	    {
	       if(i%7 == 0 || i%7 == 6) // checking if it's sunday
	       {
	               total_sat_sun++;
	       }
	    }
	    
	    sort(A, A+N); //sorting the festival days 
	    
	    total_holiday+=total_sat_sun; //Sundays and Saturdays are also holidays
	    
	    for(int j=1; j<=N; j++)
	    {
	       if(A[j]%7 != 0 && A[j]%7 != 6) //checking if the festival day is saturday/sunday
	       {
	               total_holiday++; 
	       }
	    }
	    cout<<total_holiday<<endl;
	  }
	  return 0;
}
	

Learning course: Solve Programming problems using C++
Problem Link: CodeChef: Practical coding for everyone

@sougata20702 here we meet again mate !!
if(i%7 == 0 || i%7 == 6)
this is where your code gets failed the sat present in the question are 6,13,20 &27 and if u divide them by 6 it will not give u correct ans rest everything seems fine to me.

i have pasted my code below
hope this helps !!

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

int main()
{
int t;
cin >> t;

while(t--)
{ int count =0;
    int N;
    cin >> N;
    int A[N];
    for(int i=0; i < N; i++)
    {
        cin >> A[i];
        if(A[i]%7==0||A[i]==6||A[i]==13||A[i]==20||A[i]==27)
        {
            count++;
        }
    }
    int hol=(N+8)-count;
    cout<<hol<<endl;
}

}