Cod sursa(job #2428004)
Utilizator | Data | 3 iunie 2019 14:12:21 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <iostream>
#include <fstream>
using namespace std;
int n,x=25,s;
int main()
{
ifstream f("fact.in");
ofstream g("fact.out");
f>>n;
n=n*5;
while(x<n){
n=n-(n/x)*5;
x=x*5;
}
g<<n;
return 0;
}