why i am getting wa even though my prog is running for the given test case

, , ,

#include<stdio.h>

long int power(int n)
{
    long int pro=1;
    
    while(n)
    {
        pro = pro*5;
        n--;
    }
    return pro;
}
         
int main()
{
    int num=0;
    long int arr[100000],t,temp,n,i,count=0;

    scanf("%ld",&t);
    temp = t;

    while(t)
    {
         count=0;
         num=1;
         scanf("\n%ld",&n);
        
        do
        {
            i = power(num);
            if(i<n)
                count= count+(n/i);
            num++;
        }while(i<n);     
        arr[temp-t]=count;
        t--;
     }

     while(t<temp)
     {
         printf("%ld\n",arr[t++]);
     }
    
     return 0;
}

mention the question!

There is a single positive integer T on the first line of input (equal to about 100000). It stands for the number of numbers to follow. Then there are T lines, each containing exactly one positive integer number N, 1 <= N <= 1000000000.

Output

For every number N, output a single line containing the single non-negative integer Z(N).
where Z(N) gives the number of trailing zeroes in N!

Example

Sample Input:
6
3
60
100
1024
23456
8735373

Sample Output:
0
14
24
253
5861
2183837

well, thank you for asking but i got my answer. I was not checking for i=n condition in the while loop and if case.