My issue
give me correct code
My code
# Update the '_' in the code below to solve the problem
t = int(input()) # Number of test cases
for _ in range(t):
N, k = map(int, input().split()) # Read N and k
A = list(map(int, input().split())) # Read the array A
# Initialize variables - pos, neg, and divk
pos = 0
neg = 0
divk = 0
# Loop through all elements of the array
for num in A:
if num > 0:
pos += 1
elif num < 0:
neg += 1
if num != 0 and num % k == 0:
divk += 1
print(pos, neg, divk)
Learning course: Design and Analysis of Algorithms
Problem Link: Count positive and non-zero elements in Design and Analysis of Algorithms