Cod sursa(job #2700369)

Utilizator Victor280605Victor Dragos Victor280605 Data 27 ianuarie 2021 15:37:24
Problema Factorial Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.39 kb
#include <iostream>
#include <fstream>

using namespace std;

ifstream in("factorial.in");
ofstream out("factorial.out");

int main()
{
    long long int i,p,c;
    in >> p;
    i=0;
    c=1;
    if(p==0){
        out << 1;
    }
    else{
       while(c!=p)
    {
        i=i+1;
        if(i%5==0)
        {
            c=c+1;
        }
    }

    out << i;
    }


}