Getting wrong answer in NUMFACT

#include<stdio.h>
//#include<conio.h>
#include<math.h>
int pi=-1,prime[50],count[50];
int primenum(long long a)
{ int i,f=1;
for(i=2;i<=a/2;i++)
{
if(a%i==0)
{f=0;
break;
}
}
return f;
}
void push(long long a)
{ int i,f=0;
for(i=0;i<=pi;i++)
{ if(prime[i]==a)
{count[i]++;
f=1;
break;
}
}
if(f==0)
{prime[++pi]=a;
count[pi]=1;
}
}

   int main()
   {   
       long long a,po,k;
       int n,t,i,j,f,fl,l,m;
       scanf("%d",&t);
       for(i=1;i<=t;i++)
  {      po=1;
       for(m=0;m<50;m++)
       {prime[m]=0;
       count[m]=0;
       } pi=-1;
         scanf("%d",&n);
         for(j=1;j<=n;j++)
         {  k=2;
           scanf("%lld",&a);
           f=primenum(a);
           if(f==1)
            push(a);
           else
           {   for(k=2;k<=sqrt(a)+1;k++)
           
             { 
                 while(a%k==0)
                 {  fl=primenum(k);
                   if(fl==1)
                   {push(k);
                   a=a/k;
                   } 
                 else k++;
                }
               
           
            }   
         }
     }
         for(l=0;l<=pi;l++)
          po=po*(count[l]+1);
        printf("%lld",po);
                            
         }
  //       getch();
         return 0;
         }

Please indent the code properly.anyways if u think ur logic is right,then try putting ‘\n’ after %lld in third last line,i.e it should be written as
printf("%lld\n",po); instead of printf("%lld",po).Try this first and let me know.

not working it is not still working after using printf("%lld\n",po); instead of printf("%lld",po)

Brother, let me try to help you…

Try this test case

1
2
1009 9973

Remember : you have to factorize those Ais, each of them is up to 1.000.000 (10^6), there are 168 primes only less than 1000, so you are not dealing with such a big numbers…