- 1
Counter Spiral in PYTHON
Given a square matrix, you have to write a program to print it in a counter-clockwise spiral form. Input Format: The first line of the input contains a number n which represents the number of rows and columns in the matrix. From the second line contains the n rows with each row having n elements separated by a space. Output Format: Print the elements in a single line with each element separated by a space Example: Input: 4 25 1 29 7 24 20 4 32 16 38 29 1 48 25 21 19 Out 25 24 16 48 25 21 19 1 32 7 29 1 20 38 29 4
2 ответов
0
tnx u
- 2
This might help, though this won't work if you repeat the numbers as you did in the example.
https://code.sololearn.com/cEO9gFYIii7H/#