Cod sursa(job #1693868)
Utilizator | Data | 24 aprilie 2016 01:30:57 | |
---|---|---|---|
Problema | Factorial | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.26 kb |
#include<iostream>
#include<fstream>
using namespace std;
int main()
{
__int64 p;
ifstream f("fact.in");
f>>p;
f.close();
ofstream g("fact.out");
if(!((p+1)%6))
g<<-1;
else
g<<(p-p/6)*5;
g.close();
}