Cod sursa(job #1195475)

Utilizator crisana stanescu cris Data 7 iunie 2014 13:24:58
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.26 kb
#include <iostream>
#include <fstream>
using namespace std;
int main()
{int N,P,x,t;
t=1;
ifstream f("fact.in");
ofstream g("fact.out");
f>>P;
while (x!=P)
{while (t!=0)
{if (t%5==0) x=x+1;
t=t/5;}
t=t+1;}
g<<t-1;
f.close();
g.close();
return 0;
}