Cod sursa(job #1322097)

Utilizator AhabyIloaia Pirvulescu Andreea Ahaby Data 19 ianuarie 2015 19:28:45
Problema Factorial Scor 5
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.33 kb
#include<fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int N,P,c;
int main()
{
    fin>>P;
    N=1;
    c=0;
    while(P!=c)
    {
        if(N%5==0)
        {
            c++;
        }
        N++;
    }
    fout<<N-1;
    fin.close();
    fout.close();
    return 0;
}