RotationMatrix_right


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

4 9 6 
1 8 8

範例輸入2

2 2
5 6
4 3

範例輸出2

4 5 
3 6

範例輸入3

2 3
6 3 9
5 4 2

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

範例輸出3

5 6 
4 3 
2 9

Comments

There are no comments at the moment.