factorial problem in c - "wrong answer"

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;

}

what problem you are facing?

what problem you are facing?

i checked the output on codeblocks. Its working fine.
But here on codechef…its saying wrong answer!!

#include<stdio.h>
#include<conio.h>
void main()
{
int fact,f;
printf(“enter any no”);
scanf("%d",&f);
if(f==0||f==1)
{
printf(“fact=1”);
}
else
{
for(int i;i<=f;i++)

Blockquote

{
fact=f*fact;
}
printf(“fact=%d”,&fact);
}
getch();
}

This solution will not be accepted by CodeChef since <conio.h> is not a part of the C Standard Library.

//