Cod sursa(job #972589)
| Utilizator | Data | 12 iulie 2013 11:03:49 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <fstream>
using namespace std;
int main()
{
long long p;
int zeros=0;
ifstream fin("fact.in");
ofstream fout("fact.out");
fin>>p;
for(int i=0;zeros<=p;i=i+5)
{
int j=i;
while(j%5==0 && j!=0)
{
zeros++;
j=j/5;
}
}
fout<<i;
return 0;
}
