0101少儿编程
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
IDE下载
Login
Register
5395: 【63课】【3365】 蛇形填数
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:109
Solved:50
Submit
Submit Record
Statistics
ShowOff!
Description
在
n
×
n
方阵里填入
1
,
2
,
3
,... ,
n
×
n
,要求填成蛇形。例如
n
=
4
时方阵为:
10 11 12 1 9 16 13 2 8 15 14 3 7 6 5 4
其中,
n
≤
20
。
Input
输入
n
。
Output
输出题述方阵。
n
行,每行各数之间用一个空格隔开。
Sample Input
Copy
4
Sample Output
Copy
10 11 12 1 9 16 13 2 8 15 14 3 7 6 5 4
Source/Category
一本通编程启蒙
二维数组
Submit
Submit Record
Statistics
ShowOff!