i checked every input. Its giving the right output but the judge says "wrong answer". Whats wrong with it?
include <stdio.h>
include <stdlib.h>
include<math.h>
int power(int);
int main()
{ int t,n,q;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
int powerv=power(n);
int powsum=0;
for(q=1;q<powerv;++q)
{
float f=n/pow(5,q);
powsum=powsum + floor(f);
}
printf("%d\n",powsum);
}
return 0;
}
int power(int n)
{
int i;
for(i=0;i<n;i++)
{
if(pow(5,i)>n)
break;
}
return i;
}