Cod sursa(job #1771426)
| Utilizator | Data | 5 octombrie 2016 17:06:32 | |
|---|---|---|---|
| Problema | Factorial | Scor | 35 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <fstream>
using namespace std;
ifstream fin ("fact.in");
ofstream fout ("fact.out");
int p,N,ok,aux;
int main()
{
fin>>p;
do {
N+=5;
aux=N;
while(aux%5==0)
{
aux/=5;
ok++;
}
}while(ok<p);
fout<<N;
return 0;
}
