Cod sursa(job #1650093)

Utilizator Tester1000Oinaru Razvan Tester1000 Data 11 martie 2016 16:28:41
Problema Factorial Scor 10
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 kb
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");
int main()
{int P;
    f>>P;
    if(P==0)
        g<<"1";
    else if(P<5)
    g<<P*5;
    if(P>=5)
    g<<(P-1)*5;

    return 0;
}