Cod sursa(job #1770357)
Utilizator | Data | 4 octombrie 2016 09:33:25 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.38 kb |
#include <fstream>
using namespace std;
long long int p;
int res = 1;
void read()
{
ifstream f("fact.in");
f>>p;
f.close();
}
void solution()
{
res = p*5;
if(p > 2) res -= 5;;
}
void write()
{
ofstream g("fact.out");
g<<res;
g.close();
}
int main()
{
read();
solution();
write();
return 0;
}