t = int(input())

n = []
q = []
a = []

for i in range(t):
    temp_list = list(map(int, input().split(' ')))
    n.append(temp_list[0])
    q.append(temp_list[1])
    a.append(temp_list[2:])

k = []
for i in range(t):
    k.append(0)
    for j in range(n[i]):
        for g in range(n[i]-j):
            if sum(a[i][g:g+j+1])>=(q[i]*(j+1)/100):
                k[i] += 1
    k[i] = str(k[i])


print(' '.join(k))


