Problem1411--蛇形填数(模拟)

1411: 蛇形填数(模拟)

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

在nxn方阵中填入1,2,...,nxn,要求输入蛇形,如


Input

4


Output

n=4 时方阵为: 
10  11  12  1 
9   16   13  2 
8   15   14  3 
7    6    5   4 






Sample Input Copy

4

Sample Output Copy

 10 11 12  1
  9 16 13  2
  8 15 14  3
  7  6  5  4

HINT

设置靠右位宽为3(n<=8).

Source/Category

admin