Help me in solving AO15 problem

My issue

explain this

My code

# this code has some logical error - debug this code to solve the problem

t = int(input())
for i in range(t):
    n = int(input())
    A = list(map(int,input().split()))
    
    count_neg = 0
    count_zero = A.count(0)
    
    if count_zero > 0:
        print(0)
    else:
        i = 0
        while i<n:
            if A[i] < 0:
                count_neg = count_neg + 1
            i = i + 1
        
        if count_neg%2 == 0:
            print(0)
        else:
            print(1)

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

@santhvana
the logic is when u get at least one 0 then answer would be 0 .
else case if u don’t get any 0 then if the count of negative numbers are even then the answer would be 0 or else case it would be 1.

thankyou.