Cod sursa(job #1649664)
| Utilizator | Data | 11 martie 2016 14:31:27 | |
|---|---|---|---|
| Problema | Factorial | Scor | 10 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <fstream>
using namespace std;
ifstream f ("fact.in");
ofstream g ("fact.out");
int p,x;
int main()
{
f>>p;
if(p*5<25) x=p*5;
if(p*5>25) x=(p-1)*5;
if(p==0) x=1;
if(p*5==25) x=25;
g<<x<<'\n';
return 0;
}
