4962: 【矩阵】图像旋转

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:19 Solved:13

Description

输入一个n行m列的黑白图像,将它顺时针旋转90度后输出。

Input

第1行包含两个整数n和m,范围是 [1, 100] 
接下来n行,每行m个整数,表示每个像素点的灰度,范围是 [0, 255] ,空格隔开

Output

m行,每行n个整数,为顺时针旋转呢90度后的图像,相邻两个整数之间用单个空格隔开

Sample Input Copy

3 3 
1 2 3
4 5 6
7 8 9

Sample Output Copy

7 4 1
8 5 2
9 6 3