here’s my solution in c. it works fine on dev c++ but the judge only displays wrong answer. is there any logical error?
#include<stdio.h>
#include<math.h>
int main()
{
long int n[100000],T,i,ans[100000],j,k,m;
scanf("%ld",&T);
for(i=0;i<T;i++)
{
scanf("%ld",&n[i]);
}
for(k=0;k<T;k++)
for(j=0;j<10;j++)
{
ans[k]=ans[k]+n[k]/pow(5,(j+1));
}
for(m=0;m<T;m++)
printf("%ld \n",ans[m]);
return 0;
}