Help me in solving P3149 problem

My issue

Can you explain what case am I missing for the code below:
for _ in range(int(input())):
n = int(input())
l = list(map(int, input().split()))
neg_nums = 0
for i in l:
if i < 0: neg_nums += 1
if neg_nums == n: print(0)
else: print(neg_nums)

My code

# cook your dish here
for _ in range(int(input())):
    n = int(input())
    l = list(map(int, input().split()))
    neg_nums = 0
    for i in l:
        if i < 0: neg_nums += 1
    if neg_nums == n: print(0)
    else: print(neg_nums)

Problem Link: Easy Subarray Sum Practice Coding Problem