Pagini recente » Profil Ovidiu-Antonio | Cod sursa (job #856940) | Cod sursa (job #428851) | Cod sursa (job #1491508) | Cod sursa (job #2632189)
#include <bits/stdc++.h>
using namespace std;
ifstream fin("patrate2.in");
ofstream fout("patrate2.out");
const int mod = 98999;
int ans[1002];
int n;
void Ori (int a[], int x) {
int t = 0;
for (int i = 1; i <= a[0]; i++) {
int aux = t + a[i] * x;
a[i] = aux % 10;
t = aux / 10;
}
if (t > 0)
a[++a[0]] = t;
}
int main ()
{
fin >> n;
ans[1] = ans[0] = 1;
for (int i = 1; i <= n; i++)
Ori(ans, i);
for (int i = 1; i <= n * n; i++)
Ori(ans, 2);
for (int i = ans[0]; i >= 1; i--)
fout << ans[i];
return 0;
}