Cod sursa(job #1927976)

Utilizator robertro1Benedek Robert George robertro1 Data 15 martie 2017 19:29:27
Problema Factorial Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include <bits/stdc++.h>

using namespace std;

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

    unsigned long long cat, n=0 ,p;
    f>>p;
    //if(p==0)
        g<<"1";
    //    else
        {


        if(p%5!=0)
        cat=p/5;
        else
            cat=p/5-1;
    n=p*5-cat*5;

    g<<n;


    }
    return 0;
}