File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
CodeTree/ํ๋ก๊ทธ๋๋ฐ๊ธฐ์ด/09_๋ฌธ์์ด Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ import java .io .*;
2+ import java .util .*;
3+ /**
4+ * 1. ๋ฌธ์ ์ ๋ณด
5+ * - ์ ๋ชฉ : ๋ฌธ์์ด์ ๊ฐ์
6+ * - ๋งํฌ : https://www.codetree.ai/missions/4/problems/number-of-spring/description
7+ * 2. ํ์ดํต์ฌ
8+ * - ๋ฌธ์์ด ๋น๊ต
9+ * 3. ํ์ดํ๊ธฐ
10+ * - ๊ฐ๋จํ ๋ฌธ์ ํ์ด
11+ */
12+ public class Main {
13+ public static void main (String [] args ) throws Exception {
14+ BufferedReader br = new BufferedReader (new InputStreamReader (System .in ));
15+ StringBuffer sb = new StringBuffer ();
16+
17+ int n = 0 ;
18+ for (n = 0 ;;n ++) {
19+ String str = br .readLine ();
20+ if (str .equals ("0" )) break ;
21+ if (n % 2 == 0 ) sb .append (str ).append ("\n " );
22+ }
23+
24+ System .out .printf ("%d\n %s" , n , sb .toString ());
25+ }
26+ }
You canโt perform that action at this time.
0 commit comments