Cod sursa(job #1195558)

Utilizator crisana stanescu cris Data 7 iunie 2014 21:48:00
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <iostream>
#include <fstream>
using namespace std;
int main()
{int long long N,P,x;
N=1;
x=0;
ifstream f("factin.txt");
ofstream g("factout.txt");
f>>P;
while (x<P)
{t=N;
while (T!=0)
{if (T%5==0) x=x+1;
t=t/5;}
N=N+1;}
if (x==P) g<<N-1;
f.close();
g.close();
return 0;
}