Pagini recente » Rezultatele filtrării | Cod sursa (job #635320) | Borderou de evaluare (job #725087) | Cod sursa (job #2178886) | Cod sursa (job #1011922)
#include <cstdio>
#include <cstdlib>
#define fr(i, a, b) for(int i=0; i<a; ++i)
int main()
{
long long int p, s, n = 0;
long long int ketto = 0, ot = 0;
freopen("fact.in", "r", stdin);
freopen("fact.out", "w", stdout);
scanf("%lld", &p);
while (true)
{
++n;
s = n;
while(s%5==0)
{
++ot;
if (ot==p) break;
s /= 5;
}
if (ot==p) break;
}
printf("%lld", n);
return 0;
}