Cod sursa(job #1126694)
| Utilizator | Data | 27 februarie 2014 09:07:54 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <fstream>
using namespace std;
int main () {
ifstream f("cifra.in");
ofstream g("cifra.out");
int n, c=5, p=0, s=0;
f>>n;
while(s<n){
p=c;
while(p%5==0){
p=p/5;
s++;
}
c=c+5;
}
g<<c-5;
f.close();
g.close();
}
