Last active
January 31, 2018 04:22
-
-
Save phannam1412/19dc318aba48bf5bac069d5910b64841 to your computer and use it in GitHub Desktop.
for test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write it in Python, input from input.txt and output to output.txt | |
input.txt contains an integer representing the size of the matrix. | |
output.txt contains the result matrix. | |
Example input and output: | |
input.txt: 3 | |
output.txt: | |
5 6 7 | |
4 9 8 | |
3 2 1 | |
input.txt: 4 | |
output.txt: | |
7 8 9 10 | |
6 15 16 11 | |
5 14 13 12 | |
4 3 2 1 | |
input.txt: 5 | |
output.txt: | |
9 10 11 12 13 | |
8 21 22 23 14 | |
7 20 25 24 15 | |
6 19 18 17 16 | |
5 4 3 2 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment