Cod sursa(job #2225566)

Utilizator IMIR33Iacob-Mare Ionut Radu IMIR33 Data 27 iulie 2018 15:56:20
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.31 kb
#include <iostream>
#include <fstream>

using namespace std;

ifstream f ("fact.in");
ofstream g ("fact.out");

int main()
{
    int p, n=1;

    f >> p;

    while(p)
    {
        if(p == n / 5 + n / 25)
            p = 0;
        else
            n++;
    }

    g << n;

    return 0;
}