-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path세로읽기.java
More file actions
26 lines (23 loc) · 743 Bytes
/
세로읽기.java
File metadata and controls
26 lines (23 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 세로읽기
import java.util.*;
import java.lang.*;
import java.io.*;
class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
char[][] arr = new char[5][15];
for (int i = 0; i < 5; i++) {
String line = br.readLine();
for (int j = 0; j < line.length(); j++) {
arr[i][j] = line.charAt(j);
}
}
for (int i = 0; i < 15; i++) {
for (int j = 0; j < 5; j++) {
if (i < arr[j].length && arr[j][i] != '\0') {
System.out.print(arr[j][i]);
}
}
}
}
}