Cod sursa(job #1501411)
Utilizator | Data | 13 octombrie 2015 13:34:23 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.31 kb |
#include<fstream>
using namespace std;
int main ()
{
ifstream fin("fact.in");
ofstream fout("fact.out");
int N=1,p,j;
fin>>p;
do
{
j=N;
do
{
p--;
j=j/5;
}while(j%5==0);
N++;
}while(p!=0);
fout<<N;
}