Spiral
Execution time limit is 1 second
Runtime memory usage limit is 122.174 megabytes
Print the two dimentional array of size n × n, filled with the numbers from 1 to n^2
by spiral. The spiral of numbers starts at left upper corner and rotates clockwise.
Input
One number n (1 ≤ n ≤ 10).
Output
Print n^2
numbers - the array filled by spiral.
Examples
Input #1
Answer #1
Input #2
Answer #2
Input #3
Answer #3
Submissions 1K
Acceptance rate 52%