http://acm.hdu.edu.cn/showproblem.php?pid=2123
1 #include <stdio.h>
2 int C,N;
3 int main()
4 {
5 scanf("%d",&C);
6 while(C--){
7 scanf("%d",&N);
8 int i,j;
9 for(i=1;i<=N;i++)
10 for(j=1;j<=N;j++){
11 printf("%d",i*j);
12 if(j==N) printf("\n");
13 else printf("");
14 }
15 }
16 }