Cod sursa(job #1771434)
| Utilizator | Data | 5 octombrie 2016 17:11:28 | |
|---|---|---|---|
| Problema | Factorial | Scor | 25 |
| 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");
long long 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;
}
