Cod sursa(job #1924506)
| Utilizator | Data | 12 martie 2017 13:04:01 | |
|---|---|---|---|
| Problema | Factorial | Scor | 15 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("fact.in"); ofstream g("fact.out");
int n,x; long long i;
int main()
{
f>>n;
x=0;
i=0;
while(x!=n)
{
long long j;
i+=5;
j=i;
while(j%5==0)
{
x++;
j/=5;
}
}
g<<i;
return 0;
}
