Need help in this problem .

Practice problem - Count the Holidays - Problems | CodeChef

My logic is that

if element of the array % 7 = 0 then there will be 1 less holiday

but my answer is not getting accepted

Need help in this problem .

Practice problem - Count the Holidays - Problems | CodeChef

My logic is that

if element of the array % 7 = 0 then there will be 1 less holiday

but my answer is not getting accepted

The Festival Day can be on Saturday and Sunday as well

If a[i]%7==6 It means it is Saturday But if it is also a Festival Day,Still it will be counted as one Holiday

Abd if a[i]%7==0 It means Sunday

So for array of given Festival days if a[i]%7==0 or a[i]%7==6 It is Sunday and Saturday respectively So they won’t be counted in additional holidays

if you are familier with python then heres my code

t = int(input())

for i in range(t):

N = int(input())

A = list(map(int, input().split()))

```
for i in range(len(A)):
count =0
if A[i]%7 == 0:
count =+1
elif (A[i]+1 )%7 == 0 :
count += 1
else :
count = count
print (8+N - count)
```

Hello @yashjoshi6787 ,

Please correct below line

- declare => “count=0” outside your for loop
- correct minor mistake => “count+=1” instead of “count=+1”
- correct indentation where required