Cod sursa(job #2328737)

Utilizator Mathe13Mathe Andrei Mathe13 Data 26 ianuarie 2019 10:24:26
Problema Patrate2 Scor 30
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.62 kb
#include <iostream>
#include <fstream>

using namespace std;

ifstream fin("patrate2.in");
ofstream fout("patrate2.out");

long long n, sol;

long long Faktorial(long long a, long long b)
{
	long long res = 1;
	for (long long i = a; i <= b; ++i)
		res *= i;
	return res;
}

long long Pow(long long a, long long b)
{
	long long res = a;
	for (long long i = 2; i <= b; ++i)
		res *= a;
	return res;
}

void Solve()
{
	sol = Faktorial(2, n);
	sol *= Pow(2, n*n);
}

void Read()
{
	fin >> n;
}

void Write()
{
	fout << sol;
}

int main()
{
    Read();
    Solve();
    Write();
    return 0;
}