Correct output but still showing wrong solution

problem:Contest Page | CodeChef

Solution:Solution: 41796692 | CodeChef
try:
t = int(input())
c=0
for start in range(t):
n, k = map(int, input().split())
x = list(map(int, input().split()))
for first in x:
if ((first+k)%7==0):
c+=1
print ©
except:
pass

Here’s your modified code.

try:
    t = int(input())
    for start in range(t):
        c=0
        n, k = map(int, input().split())
        x = list(map(int, input().split()))
        for first in x:
            if ((first+k)%7==0):
                c+=1
        print(c)
except:
    pass

Basically, c=0 should be placed inside the for loop.

ohh! thankyou so much