mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 12:41:58 -05:00
24 lines
652 B
Java
24 lines
652 B
Java
package com.study.demo;
|
|
|
|
import java.util.Scanner;
|
|
|
|
public class test3_4 {
|
|
public static void main(String[] args) {
|
|
Scanner scanner = new Scanner(System.in);
|
|
int n = scanner.nextInt();
|
|
int m = scanner.nextInt();
|
|
int[][] image = new int[n][m];
|
|
for (int i = 0; i < n; i++) {
|
|
for (int j = 0; j < m; j++) {
|
|
image[i][j] = scanner.nextInt();
|
|
}
|
|
}
|
|
for (int j = 0; j < m; j++) {
|
|
for (int i = n - 1; i >= 0; i--) {
|
|
System.out.print(image[i][j] + (i == 0 ? "" : " "));
|
|
}
|
|
System.out.println();
|
|
}
|
|
}
|
|
}
|