Cod sursa(job #528159)

Utilizator Theorytheo .c Theory Data 2 februarie 2011 11:45:20
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.36 kb
#include<fstream.h>
int i=0,j,k=5,p,s=0,l=0,o,u;
int main(){
	ifstream fin("fact.in");
	fin>>p;
	fin.close();
	ofstream fout("fact.out");
	/*while(l<p)
	{   l=0;
	    k=5;
		i++;
		while(i/k)
		{
			l=l+i/k;
			k=k*5;
		}
		
	}
	fout<<i;*/
	if(p>0)
	
	u=(1+p)*4+5-(1+p)*4%5;
	else
		u=1;
		
	fout<<u;
	
	
	fout.close();
	return 0;
}