1. ๋ด ์ฝ๋
import java.util.Scanner;
class Solution
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for (int test_case = 1; test_case <= T; test_case++) {
int N = sc.nextInt();
int [][] arr = new int[N][N];
System.out.println("#"+test_case);
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
arr[i][j] = sc.nextInt();
}
}
for(int t = 0; t < N; t++){
for (int i = N - 1; i >= 0; i--) {
System.out.printf("%d", arr[i][t]);
}
System.out.printf(" ");
for (int i = N - 1; i >= 0; i--) {
System.out.printf("%d", arr[(N - 1)-t][i]);
}
System.out.printf(" ");
for (int i = 0; i < N; i++) {
System.out.printf("%d", arr[i][(N - 1)-t]);
}
System.out.println();
}
}
}
}
0