螺旋の問題は>>14-15よりもこっちの方がまともだね

spiral

Build a matrix of numbers, which will be presented in the form of a spiral.
The input is the size of the matrix. Use tabs as a delimeter.

IN
3

OUT
1 2 3
8 9 4
7 6 5

IN
5

OUT
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9