File tree Expand file tree Collapse file tree 5 files changed +54
-0
lines changed Expand file tree Collapse file tree 5 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1+ #1 A D B E C F
2+ #2 JACK KING QUEEN ACE
3+ #3 ALAKIR LORD-JARAXXUS ALEXSTRASZA AVIANA DR-BOOM
You canโt perform that action at this time.
0 commit comments