#include <iostream>
#include <math.h>


using namespace std;

int main()
{
    int q;
    int n;
    int t;
    int k=0;
    int sum=0;
    int l;
    int r;
    int p;
    int x=0;
    int c = 0;

    cin >> t;
    t=t-1;
    int s=0;
    int e[t];
    while(s<=t)
    {
      k = 0;
      cin >> n;
      n=n-1;
      cin >> q;
      int a[n];
      c = 0;
      while (c<=n)
       {
          cin >> a[c];
          c++;
       }

       while (k<=n)
       {

          r=0;
          l=r+k;
       while(l<=n)
        {
           p=r;

            while(l>=p)
             {
                sum=sum+a[p];
                p++;
             }
         sum=sum*100/q;
         int j=k+1;
         if(sum>=j)
         x=x+1;
         r++;
         sum = 0;
         l=r+k;
        }
      k=k+1;
    }
     e[s] = x ;
    s++;
    x=0;
    }
    s=0;
       while (s<=t)
         {
           cout << e[s]<< " ";
           s++;
         }

}
