RotationMatrix_left


Submit solution

Points: 50 (partial)
Time limit: 1.0s
Memory limit: 64M

Authors:
Problem types

題目說明

輸入二維陣列,輸出向「左」旋轉90度後的矩陣

輸入

  1. 依序輸入兩個整數:直行(col)、橫列(row)
  2. 輸入矩陣的內容

輸出

旋轉後的矩陣

範例輸入1

3 2
6 8
9 8
4 1

說明:大小為3*2的陣列

範例輸出1

8 8 1 
6 9 4

範例輸入2

2 2
5 6
4 3

範例輸出2

6 3 
5 4

範例輸入3

2 3
6 3 9
5 4 2

說明:大小為2*3的陣列

範例輸出3

9 2 
3 4 
6 5

Comments

There are no comments at the moment.