Pagini recente » Cod sursa (job #2369352) | Cod sursa (job #1315941)
// APlusB.cpp : main project file.
//#include "stdafx.h"
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <math.h>
//using namespace System;
using namespace std;
int main(/*array<System::String ^> ^args*/)
{
/*long a, b;
ifstream fin("adunare.in");
fin >> a;
fin >> b;
fin.close();
ofstream fout("adunare.out");
fout<<a+b;
fout.close();
return 0;*/
/*short P, Rest;
unsigned long long S, N;
ifstream fin("suma.in");
fin >> N;
fin >> P;
fin.close();
Rest = N%3;
switch (Rest)
{
case 0:
S = ((N-1)%P)*((N/3)%P)*((N+1)%P);
break;
case 1:
S = (((N-1)/3)%P)*(N%P)*((N+1)%P);
break;
case 2:
S = (((N+1)/3)%P)*(N%P)*((N-1)%P);
break;
default:
S = 0;
break;
}
S = S%P;
ofstream fout("suma.out");
fout<<S;
fout.close();
return 0;*/
short N;
unsigned long long Cases;
ifstream fin("patrate2.in");
fin >> N;
fin.close();
Cases = pow(2, (double)N*N);
for (short i = 1; i <= N; i++)
Cases = Cases*i;
ofstream fout("patrate2.out");
fout<<Cases;
fout.close();
}