Cod sursa(job #2114865)
Utilizator | Data | 25 ianuarie 2018 23:04:10 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
#include <iostream>
#include<fstream>
using namespace std;
ifstream f("fact.in");
ofstream g("fact.out");
int p;
int main()
{
f>>p;
if(p==0)
g<<1;
else if(p==2)
g<<10;
else g<<5*(p-1);
}