Type: FileIO (rotate) 1000ms 256MiB

矩阵旋转输出

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

对于一个给定的 3×3 矩阵,请将其顺时针旋转 90 度后输出。

输入格式

测评机会反复运行程序。每次程序运行时,你的程序仅需要输入三行,第 i 行输入三个整数ai,bi,ci(−10000≤ai,bi,ci≤10000),任意两个整数之间用一个空格分开。

输出格式

输出为三行,每行包括三个整数,与题目要求的一致(从直观上看,输出的结果应为输入的矩阵旋转 90 度后的结果),每行的任意两个整数之间用一个空格分开。

输出时每行末尾的多余空格,不影响答案正确性

样例输入1

1 2 3 
3 4 6 
7 8 9

样例输出1

7 3 1 
8 4 2 
9 6 3

样例输入2

6 6 6 
2 3 3 
9 1 1

样例输出2

9 2 6 
1 3 6 
1 3 6

B班第八天测试

Not Attended
Status
Done
Rule
Ledo
Problem
11
Start at
2025-7-28 19:00
End at
2025-7-28 21:00
Duration
2 hour(s)
Host
Partic.
8