#Z15209. 图像旋转
图像旋转
Description
Enter an n-row by m-column black-and-white image and output it after rotating it 90 degrees clockwise.
Input Format
The first line contains two integers, n and m, representing the number of rows and columns of pixels in the image. (1 ≤ n ≤ 100, 1 ≤ m ≤ 100).
The next n lines each contain m integers, representing the grayscale value of each pixel in the image.
Adjacent integers are separated by a single space, and each element ranges from 0 to 255.
Output Format
Output m lines, each containing n integers, representing the image rotated 90 degrees clockwise. Adjacent integers are separated by a single space.
3 3
1 2 3
4 5 6
7 8 9
7 4 1
8 5 2
9 6 3