2 3
1 1 1 1 1 1 1 2 1
#includelong YH(int n,int m) { long i = 1,j = 1,s1 = 1,s2 = 1; if(m == 1) return 1; else { m --; n --; for(j = 1;j <= m;j ++) { s1 = s1 * (n --); s2 *= j; if(s1%s2 == 0) //盡可能盡早的減小s1,s2,否則後期會溢出 { s1 /= s2; s2 = 1; } } return s1/s2; } } int main(void) { long int n; while(scanf(%d,&n)!=EOF) { int i,j; for(i = 1;i <= n;i ++) { for(j = 1;j <= i;j ++) { if(j == 1) printf(%ld,YH(i,j)); else printf( %ld,YH(i,j)); } printf( ); } printf( ); } return 0; }