10798๋ฒ: ์ธ๋ก์ฝ๊ธฐ (acmicpc.net)
1. ๋ด ์ฝ๋
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[][] word = new char[5][15];
for (int i = 0; i < 5; i++) {
String s= sc.nextLine();
for (int j = 0; j < s.length(); j++) {
word[i][j] = s.charAt(j);
}
}
for (int i = 0; i < 15; i++) {
StringBuilder sb = new StringBuilder();
for (int j = 0; j < 5; j++) {
if(word[j][i] != 0){
sb.append(word[j][i]);
}
}
System.out.printf("%s", sb);
}
}
}
0