Cod sursa(job #1225592)
| Utilizator | Data | 2 septembrie 2014 23:26:35 | |
|---|---|---|---|
| Problema | Factorial | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream in ("fact.in");
ofstream out("fact.out");
long long P, Number;
long long Shearch_Fact (long long P) {
if (P == 0) { out << 1;
return 0; }
if (P == 1) { out << 10;
return 0; }
Number = 5;
for (int Cont = 2; Cont < P; ++Cont) {
Number += 5;
}
return Number;
}
int main () {
in >> P;
out << Shearch_Fact (P);
}
