forked from wotjd4305/Algorithm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswe5356.java
More file actions
51 lines (35 loc) · 924 Bytes
/
swe5356.java
File metadata and controls
51 lines (35 loc) · 924 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
public class swe5356 {
static Scanner sc = new Scanner(System.in);
static String[] StrArr = new String[5];
public static void main(String[] args) {
String answer = "";
int T = sc.nextInt();
//Å×½ºÆ®ÄÉÀ̽º
for(int t=0; t<T; t++) {
Arrays.fill(StrArr, "");
answer = solution();
System.out.println("#"+ (t+1) + " " + answer);
}
}
public static String solution()
{
String answer = "";
for(int i =0; i <5; i ++)
{
StrArr[i] = sc.next();
}
for(int i =0; i <15; i++)
{
for(int j = 0; j<5; j++)
{
if(StrArr[j].length() <= i)
continue;
answer = answer + StrArr[j].charAt(i);
}
}
return answer;
}
}