Cod sursa(job #1882746)
Utilizator | Data | 17 februarie 2017 14:15:14 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("fact.in");
ofstream fout("fact.out");
int main()
{
long long p;
fin>>p;
if(p==0){
fout<<"1";
}
else{
if(p>0){
fout<<p*5;
}
else{
fout<<"-1";
}
}
return 0;
}