Cod sursa(job #2329563)
Utilizator | Data | 26 ianuarie 2019 22:38:44 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.24 kb |
#include <fstream>
using namespace std;
int n;
int main() {
ifstream ifs("fact.in");
ofstream ofs("fact.out");
ifs >> n;
if (n == 0)
ofs << 1;
else if (n == 1)
ofs << 5;
else ofs << (n - 1) * 5;
return 0;
}