Cod sursa(job #2552151)

Utilizator cristiemanuelstroe cristian emanuel cristiemanuel Data 20 februarie 2020 17:02:21
Problema Factorial Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.37 kb
#include    <bits/stdc++.h>
#define ll long long

using namespace std;

ifstream fin("fact.in");
ofstream fout("fact.out");

int n,cnt,nr,p;

int main()

{
    cin>>p;
    if(p==0)
    {
        cout<<1;
        return 0;
    }
    int i=1;
    while(p)
    {
        cnt++;
        if(i%5==0)
            p--;
        i++;
    }
    cout<<cnt-5;
}