Pagini recente » Cod sursa (job #2458401) | Cod sursa (job #3157591) | Diferente pentru problema/lenes intre reviziile 3 si 5 | Cod sursa (job #2196375) | Cod sursa (job #2137450)
#include <fstream>
#include <algorithm>
#include <iostream>
#include <math.h>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
long long int n,ap=0,i,j,ap1=0;
bool ok=true;
int main()
{
fin>>n;
i=1;
ok=true;
int x;
while(ap!=n)
{
i++;
if(i%5==0)
{
x=i;
while(x%5==0)
{
ap++;
x=x/5;
}
}
}
fout<<i;
return 0;
}