Cod sursa(job #2328713)
Utilizator | Data | 26 ianuarie 2019 10:14:14 | |
---|---|---|---|
Problema | Patrate2 | Scor | 20 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <fstream>
#define mod 555557
using namespace std;
int fact(int n)
{
int aux=1;
for(int i=0; i<n; i++)
aux = (aux*(i+1))%mod;
return aux%mod;
}
int main()
{
ifstream f("patrate2.in");
int n;
f>>n;
f.close();
ofstream g("patrate2.out");
g<<(fact(n)*((1<<(n*n))%mod))%mod;
return 0;
}