Cod sursa(job #2921132)
Utilizator | Data | 27 august 2022 16:44:22 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.42 kb |
#include <fstream>
#include <iostream>
using namespace std;
ifstream f("in.txt");
ofstream g("out.txt");
int n, i, nr,j,OK;
int main()
{
f >> n; i = 1;
while (OK==0)
{
j = i;
while (j % 5 == 0 && j != 0)
{
nr++;
j /= 5;
}
if (nr >= n)
{
OK = 1;
}
else
i++;
}
g << i;
}