Skip to content

Instantly share code, notes, and snippets.

@zodiac1111
Last active December 28, 2015 07:29
Show Gist options
  • Save zodiac1111/7464999 to your computer and use it in GitHub Desktop.
Save zodiac1111/7464999 to your computer and use it in GitHub Desktop.
试题
n*n矩阵逆时针题目
给定一个小于10的正数,从(0,0)点开始逆时针输出这个矩阵;
如:
1
01
5 //输入5,输出下面的矩阵
01 16 15 14 13
02 17 24 23 12
03 18 25 22 11
04 19 20 21 10
05 06 07 08 09
10
01 36 35 34 33 32 31 30 29 28
02 37 64 63 62 61 60 59 58 27
03 38 65 84 83 82 81 80 57 26
04 39 66 85 96 95 94 79 56 25
05 40 67 86 97 100 93 78 55 24
06 41 68 87 98 99 92 77 54 23
07 42 69 88 89 90 91 76 53 22
08 43 70 71 72 73 74 75 52 21
09 44 45 46 47 48 49 50 51 20
10 11 12 13 14 15 16 17 18 19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment