mirror of
https://github.com/Dichgrem/Java.git
synced 2025-12-16 20:42:00 -05:00
style:fmt
This commit is contained in:
@@ -3,21 +3,21 @@ 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();
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user