Cod sursa(job #1002244)
Utilizator | Data | 27 septembrie 2013 09:43:22 | |
---|---|---|---|
Problema | Factorial | Scor | 5 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.23 kb |
#include <fstream>
#include <stdio.h>
using namespace std;
int main()
{
unsigned long long p;
ifstream f("fact.in");
ofstream g("fact.out");
f>>p;
if(p%6==5)
g<<"-1";
else
g<<(p-(p/6))*5;
}