Cod sursa(job #3166691)
Utilizator | Data | 9 noiembrie 2023 11:59:44 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <iostream>
using namespace std;
///ifstream in("fact.in");
///ofstream out("fact.out");
int nz(int p){
int z=0;
int k=0;
while(z<p)
{
int kk=k;
while(kk%5==0){
z++;
kk=kk/5;
}
k++;
}
return k;
}
int main()
{
int p;
cin>>p;
cout<<nz(p);
return 0;
}