Problem A: 【数组】矩阵对角线(例题)
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:101
Solved:65
Description
例5.9 已知一个6*6的矩阵(方阵),把矩阵二条对角线上的元素值加上10,然后输出这个新矩阵。
Input
6行,每行6个整数,表示一个6*6的方阵,所有整数不超过104。
Output
6行,每行6个整数,表示处理后的6阶方阵。
Sample Input Copy
1 2 3 4 5 6
7 8 9 10 11 12
13 14 15 16 17 18
19 20 21 22 23 24
25 26 27 28 29 30
31 32 33 34 35 36
Sample Output Copy
11 2 3 4 5 16
7 18 9 10 21 12
13 14 25 26 17 18
19 20 31 32 23 24
25 36 27 28 39 30
41 32 33 34 35 46