1065: [二维数组]螺旋矩阵1

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:206 Solved:7

Description

输入n,试打印输出n*n的 螺旋矩阵(每个元素占4位场宽)。

Input

例如n=7,矩阵如下图:

Output

1
2
3
4
5
6
7
24
25
26
27
28
29
8
23
40
41
42
43
30
9
22
39
48
49
44
31
10
21
38
47
46
45
32
11
20
37
36
35
34
33
12
19
18
17
16
15
14
13

Source/Category