Cod sursa(job #2628639)
Utilizator | Data | 16 iunie 2020 17:40:25 | |
---|---|---|---|
Problema | Factorial | Scor | 100 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.15 kb |
#import<fstream>
int p,m,s,n;main(){std::ifstream{"fact.in"}>>p;for(n=4*p;s<p;n++)for(m=n,s=0;m;s+=m/=5);std::ofstream{"fact.out"}<<(s-p?-1:p?n-1:1);}