Cod sursa(job #503844)

Utilizator mening12001Andrei Geogescu mening12001 Data 25 noiembrie 2010 12:30:35
Problema Factorial Scor 20
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.24 kb
#include<iostream.h>
#include<fstream.h>
#include<string.h>
int main()
{long long k=0,ct=0,x,p;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
while(ct<p)
{k++;
ct++;
x=k;
while(x%5==0)
{ct++;
x=x/5;}}
g<<k*5;
	return 0;}