Can someone please help me out.

My question is

And here is my solution,

#include

#include<stdio.h>

using namespace std;

int main()

{

int n,c=0;

scanf("%d",&n);

int no[n],zero[n];

int i;long p;

for(i=0;i<n;i++)

{

scanf("%d",&no[i]);

//factorial finding

for(int j=1;j<=no[i];j++)

{

p=p*j;

}

//finding the number of zero at the end of the factorial

while(p!=0)

{

if(p%10==0)

c++;

p/=10;

}

zero[i]=c;

c=0;p=1;

}

//printing

printf("\n%d");

for(i=0;i<n;i++)

printf("%d%",&zero[i]);

return 0;

}

The online judge is continously giving me Time out error. I cannot get mistake here. Can someone please point out it.

Thanks in advance.