Toggle navigation
编绘童年
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
[
ProblemSet
Status
Ranklist
OI Ranklist
Statistics
]
Login
Problem D: 数字方阵-填充数字4
Problem D: 数字方阵-填充数字4
Time Limit:
1
Sec
Memory Limit:
128 MB
Submit:
16
Solved:
14
[
Status
] [
Submit
] [Creator:
]
Description
模仿样例,输入n
,
输出一个n*n的数字方阵
,用
连续的数字1-9填满。
1.一行填完后,下一行接着上一行末尾的数字继续填。
2.数字9填完后,接着从数字1开始填。
Input
一个正整数n (1<=n<=100)
Output
输出n行
,
每行中
,
数字之间一个空格分隔
Sample Input
Copy
5
Sample Output
Copy
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7