Cod sursa(job #2988410)

Utilizator popuPop Matei Tudor popu Data 4 martie 2023 11:33:19
Problema Factorial Scor 10
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.3 kb
#include <bits/stdc++.h>

using namespace std;

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

long long p;

int main()
{
    fin>>p;
    if(!p)
        fout<<1;
    else if(p==2)
        fout<<10;
    else if(p%2==0)
        fout<<p*5-5;
    else
        fout<<p*5;
    return 0;
}