Cod sursa(job #2255419)
Utilizator | Data | 6 octombrie 2018 22:05:57 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main()
{
int p,ok=0;
fin>>p;
if(p==0){fout<<1;ok=1;}
else {fout<<5*p;ok=1;}
if(ok==0)fout<<-1;
return 0;
}