Cod sursa(job #1002240)
| Utilizator | Data | 27 septembrie 2013 09:42:14 | |
|---|---|---|---|
| Problema | Factorial | Scor | 5 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.25 kb |
#include <fstream>
#include <stdio.h>
using namespace std;
int main()
{
int n=1,p,ok=0,s=0,ok1=0,cont=0;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
if(p%6==5)
g<<"-1";
else
g<<(p-(p/6))*5;
}
