Pagini recente » Cod sursa (job #583337) | Cod sursa (job #924570) | Cod sursa (job #750999) | Cod sursa (job #1485199) | Cod sursa (job #139154)
Cod sursa(job #139154)
#include<stdio.h>
#include<fstream.h>
int main()
{
long p,n,tt,t,k5=0;
//ifstream in("fact.in");
//ofstream out("fact.out");
freopen("fact.in","r",stdin);
freopen("fact.out","w",stdout);
scanf("%ld ",&p);
//in>>p;
//in.close();
t=0;
do {
t+=5;
tt=t;
while(!(tt%50))
{tt=tt/5;
k5++;}
}while(k5!=p);
//out<<t;}
//out.close();
if(p==0)
printf("1");
else
printf("%ld",t/10);
return 0;
}