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