Pagini recente » Cod sursa (job #1843295) | Cod sursa (job #687906) | Cod sursa (job #2963848) | Cod sursa (job #2043446) | Cod sursa (job #3250912)
#include <iostream>
#include <fstream>
#include <queue>
using namespace std;
ifstream f("patrate2.in");
ofstream g("patrate2.out");
const int nMax = 10005;
int n, a[nMax];
void produs(int a[],int x)
{
int t = 0;
for (int i = 1;i <= a[0];i++,t/=10){
t += a[i] * x;
a[i] = t % 10;
}
if (t != 0){
for (;t != 0;t /= 10)a[++a[0]] = t % 10;
}
}
int main()
{
f >> n;
a[0] = 1;
a[1] = 1;
for (int i = 1;i <= n;i++){
produs(a,i);
}
for (int i = 1;i <= n * n;i++){
produs(a,2);
}
for (int i = a[0];i >= 1;i--)g << a[i];
}