Pagini recente » Cod sursa (job #1323869) | Cod sursa (job #1482712) | Cod sursa (job #2858413) | Cod sursa (job #231835) | Cod sursa (job #983422)
Cod sursa(job #983422)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("patrate2.in");
ofstream fout("patrate2.out");
int n, h[5000];
inline void Mul(int x)
{
short t = 0;
for(int i=1; i<=h[0]; i++)
{
h[i] = h[i] * x + t;
t = h[i] / 10;
h[i] %= 10;
}
while(t)
{
h[++h[0]] = t % 10;
t /= 10;
}
}
int main()
{
fin>>n;
h[0] = h[1] = 1;
for(int i=1; i<=n; i++)
Mul(i);
for(int i=1; i<=n; i++)
for(int j=1; j<=n; j++)
Mul(2);
for(int i=h[0]; i>0; i--)
fout<<h[i];
return 0;
}