Cod sursa(job #2329568)
Utilizator | Data | 26 ianuarie 2019 22:44:01 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include <fstream>
using namespace std;
unsigned long long 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;
}