Cod sursa(job #148639)

Utilizator dexter_dexMutascu Adrian - Dragos dexter_dex Data 4 martie 2008 17:18:48
Problema Factorial Scor 15
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.25 kb
#include<fstream.h>      
long long n,p,aux,x=0,i=0,y;
int main ()
{
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
if (p==0) g<<"1";
x=5*(p-1);

if (x==p*5) g<<x;
   else g<<"-1";
f.close();      
g.close();      
return 0;      
}