#include'stdio.h' void jiecheng(int n,int a[],int b[]) {int s,f; if(n>2) jiecheng(n-1,a,b); else {
for(s=0;s<64;++s) b[s]=a[s]; for(s=1;s<n;s++) { for(f=0;f<64;f++) { a[f]=a[f]+b[f]; if(a[f]>9) {a[f+1]=a[f+1]+1; a[f]=a[f]%10; } } } }
} main(){ int a[64]; int b[64]; int i; for(i=0;i<64;++i) a[i]=0; a[0]=1; jiecheng(1,a,b); for(i=63;i>=0;i--) printf("%d",a[i]); printf(" \n"); jiecheng(2,a,b); for(i=63;i>=0;i--) printf("%d",a[i]); printf(" \n"); jiecheng(3,a,b); for(i=63;i>=0;i--) printf("%d",a[i]); printf(" \n"); jiecheng(4,a,b); for(i=63;i>=0;i--) printf("%d",a[i]); printf(" \n"); jiecheng(5,a,b); for(i=63;i>=0;i--) printf("%d",a[i]); printf(" \n"); jiecheng(6,a,b); for(i=63;i>=0;i--) printf("%d",a[i]); printf(" \n"); printf("1 2 6 24 120 720"); }