Cod sursa(job #276335)
Utilizator | Data | 11 martie 2009 08:45:25 | |
---|---|---|---|
Problema | Factorial | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include<iostream.h>
#include<fstream.h>
ifstream f("fact.in");
ofstream g("fact.out");
long p, s;
void citire()
{
f>>p;
f.close();
}
main()
{
citire();
if(p==0) g<<'1';
else
{
long long numar;
int r;
r=p%6;
s=p/6;
numar=25*s + r*5;
g<<numar;
}
g.close();
}