Skip to content

Commit 0a9bd93

Browse files
committed
[Iterations] swea-3499
1 parent 47428d9 commit 0a9bd93

File tree

5 files changed

+54
-0
lines changed

5 files changed

+54
-0
lines changed

โ€ŽREADME.mdโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
| :-: | :-: | :------------------------------------------------------- | :--- |
1616
| 01 | | [Codility-Lesson1 BinaryGap](./src/Iterations/BinaryGap) | |
1717
| 02 | | [SWEA-1289 ์›์žฌ์˜ ๋ฉ”๋ชจ๋ฆฌ ๋ณต๊ตฌํ•˜๊ธฐ](./src/Iterations/swea1289) | |
18+
| 03 | | [SWEA-3499 ํผํŽ™ํŠธ ์…”ํ”Œ](./src/Iterations/swea3499) | |
1819

1920
## Recursion
2021

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## [SW Expert Academy - 3499] ํผํŽ™ํŠธ ์…”ํ”Œ
2+
3+
![image](https://user-images.githubusercontent.com/22045163/107465129-09048880-6ba5-11eb-8928-25db1d1a78aa.png)
4+
![image](https://user-images.githubusercontent.com/22045163/107465145-13268700-6ba5-11eb-86f6-9a258c6d4fa5.png)
5+
6+
![image](https://user-images.githubusercontent.com/22045163/107465171-246f9380-6ba5-11eb-85bb-031f440e225f.png)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package Iterations.swea3499;
2+
3+
import java.io.*;
4+
5+
public class Solution {
6+
7+
static int T, N;
8+
9+
public static void main(String[] args) throws Exception {
10+
System.setIn(new FileInputStream("src/Iterations/swea3499/sample_input.txt"));
11+
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
12+
StringBuilder sb = new StringBuilder();
13+
14+
T = Integer.parseInt(br.readLine());
15+
for (int t = 1; t <= T; t++) {
16+
sb.append("#").append(t).append(" ");
17+
18+
N = Integer.parseInt(br.readLine());
19+
String[] card = br.readLine().split(" ");
20+
int N_ = N;
21+
if (N%2 == 1) N_++;
22+
for (int i = 0; i < N_/2; i++) {
23+
sb.append(card[i]).append(" ");
24+
if (N_/2+i < N) sb.append(card[N_/2+i]).append(" ");
25+
}
26+
sb.append("\n");
27+
}
28+
29+
System.out.println(sb.toString());
30+
}
31+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
3
2+
6
3+
A B C D E F
4+
4
5+
JACK QUEEN KING ACE
6+
5
7+
ALAKIR ALEXSTRASZA DR-BOOM LORD-JARAXXUS AVIANA
8+
9+
2
10+
8
11+
1 2 3 4 5 6 7 8
12+
9
13+
1 2 3 4 5 6 7 8 9
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#1 A D B E C F
2+
#2 JACK KING QUEEN ACE
3+
#3 ALAKIR LORD-JARAXXUS ALEXSTRASZA AVIANA DR-BOOM

0 commit comments

Comments
ย (0)