Cod sursa(job #2306972)
| Utilizator | Data | 23 decembrie 2018 14:35:25 | |
|---|---|---|---|
| Problema | Patrate2 | Scor | 100 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva de probleme | Marime | 0.45 kb |
#include <fstream>
using namespace std;
ifstream f("patrate2.in");
ofstream g("patrate2.out");
int a,x[1000000],n,t,j;
void inm(int a){
t=0;
for(int i=1;i<=x[0];i++){
x[i]=x[i]*a+t;
t=x[i]/10; x[i]%=10;
}
while(t!=0){
x[++x[0]]=t%10;
t/=10;
}
}
int main()
{
f>>n; x[0]=1; x[1]=1;
for(j=1;j<=n*n;j++) inm(2);
for(j=1;j<=n;j++) inm(j);
for(j=x[0];j>=1;j--) g<<x[j];
return 0;
}
