Pagini recente » Cod sursa (job #1606975) | Cod sursa (job #920192) | Cod sursa (job #182911) | Cod sursa (job #477448) | Cod sursa (job #2988698)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
ifstream fin("fact.in");
ofstream fout("fact.out");
void solve(){
int p;
fin>>p;
int c=0;
for(int i=5;;i+=5) {
int t=i;
while(t%5==0) {
c++;
if(c==p) {
fout<<i<<'\n';
return;
}
t/=5;
}
}
}
int32_t main(){
ios::sync_with_stdio(0);
cin.tie(0);
int t=1;
//cin>>t;
while(t--){
solve();
}
#ifdef ONPC
cerr << endl << "finished in " << clock() * 1.0 / CLOCKS_PER_SEC << " sec" << endl;
#endif
}