Cod sursa(job #136869)
Utilizator | Data | 16 februarie 2008 12:13:34 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <stdio.h>
#include <math.h>
long n,p;
int main ()
{
freopen ("fact.in","r",stdin);
freopen ("fact.out","w",stdout);
float i;
int j;
scanf ("%ld",&p);
if (p==0)
{
printf ("1");return 0;
}
n=p*5;
i=sqrt(n);
j=(int)i;
j/=5;
n-=j;
printf ("%ld",n);
return 0;
}