Cod sursa(job #1926892)

Utilizator robertro1Benedek Robert George robertro1 Data 14 martie 2017 19:20:34
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.29 kb
#include <bits/stdc++.h>

using namespace std;

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

    int cat, n=0 ,p;
    f>>p;
    if(p==0)
        g<<"1";
        if(p%5!=0)
     cat=p/5;
else
    cat=(p/5)-1;
p=p-cat;
    g<<p*5;


    return 0;
}