<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>lu.log</title>
        <link>https://velog.io/</link>
        <description>기록은 나의 무기😎</description>
        <lastBuildDate>Wed, 23 Apr 2025 06:36:17 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>lu.log</title>
            <url>https://velog.velcdn.com/images/lu__study__log/profile/e39fe543-78d9-49c2-80a2-d7226d81168d/image.jpg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. lu.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/lu__study__log" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[[프로그래머스_기초]수 조작하기1]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%88%98-%EC%A1%B0%EC%9E%91%ED%95%98%EA%B8%B01</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%88%98-%EC%A1%B0%EC%9E%91%ED%95%98%EA%B8%B01</guid>
            <pubDate>Wed, 23 Apr 2025 06:36:17 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>정수 n과 문자열 control이 주어집니다. control은 &quot;w&quot;, &quot;a&quot;, &quot;s&quot;, &quot;d&quot;의 4개의 문자로 이루어져 있으며, control의 앞에서부터 순서대로 문자에 따라 n의 값을 바꿉니다.
&quot;w&quot; : n이 1 커집니다.
&quot;s&quot; : n이 1 작아집니다.
&quot;d&quot; : n이 10 커집니다.
&quot;a&quot; : n이 10 작아집니다.
위 규칙에 따라 n을 바꿨을 때 가장 마지막에 나오는 n의 값을 return 하는 solution 함수를 완성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li><p>-100,000 ≤ n ≤ 100,000</p>
</li>
<li><p>1 ≤ control의 길이 ≤ 100,000</p>
<ul>
<li>control은 알파벳 소문자 &quot;w&quot;, &quot;a&quot;, &quot;s&quot;, &quot;d&quot;로 이루어진 문자열입니다.</li>
</ul>
</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>n</th>
<th>control</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>0</td>
<td>&quot;wsdawsdassw&quot;</td>
<td>-1</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>수 n은 control에 따라 다음과 같은 순서로 변하게 됩니다.</li>
<li>0 → 1 → 0 → 10 → 0 → 1 → 0 → 10 → 0 → -1 → -2 → -1</li>
<li>따라서 -1을 return 합니다.</li>
</ul>
<hr>
<pre><code class="language-java">class Solution {
    public int solution(int n, String control) {

        // 반복문을 통해 인덱스값이 어떤 문자열인지 확인하고 덧셈 또는 뺄셈을 한다.
        for(int i = 0; i &lt; control.length(); i++){
            char controlChar = control.charAt(i);
            if(controlChar == &#39;w&#39;) {
                n = n + 1;
            } else if(controlChar == &#39;s&#39;) {
                n = n - 1;
            } else if(controlChar == &#39;d&#39;) {
                n = n + 10;
            } else {
                n = n - 10;
            }
        }
        return n;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]이어붙인 수]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%9D%B4%EC%96%B4%EB%B6%99%EC%9D%B8-%EC%88%98-ypoafixf</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%9D%B4%EC%96%B4%EB%B6%99%EC%9D%B8-%EC%88%98-ypoafixf</guid>
            <pubDate>Wed, 09 Apr 2025 12:34:29 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>정수가 담긴 리스트 num_list가 주어집니다. num_list의 홀수만 순서대로 이어 붙인 수와 짝수만 순서대로 이어 붙인 수의 합을 return하도록 solution 함수를 완성해주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>2 ≤ <code>num_list</code>의 길이 ≤ 10</li>
<li>1 ≤ <code>num_list</code>의 원소 ≤ 9</li>
<li><code>num_list</code>에는 적어도 한 개씩의 짝수와 홀수가 있습니다.</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>num_list</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>[3, 4, 5, 2, 1]</td>
<td>393</td>
</tr>
<tr>
<td>[5, 7, 8, 3]</td>
<td>581</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>홀수만 이어 붙인 수는 351이고 짝수만 이어 붙인 수는 42입니다. 두 수의 합은 393입니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>홀수만 이어 붙인 수는 573이고 짝수만 이어 붙인 수는 8입니다. 두 수의 합은 581입니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int[] num_list) {
        int answer = 0;

        // 정수를 이어붙이려면 문자열로 변환후 값을 구하고 다시 정수로 변환한다.
        String odd = &quot;&quot;;
        String even = &quot;&quot;;

        // 반복문을 통해서 홀수인지 짝수인지 판별 후 이어붙이기
        for(int i = 0; i &lt; num_list.length; i++) {
            if(num_list[i] % 2 == 0) {
                even += Integer.toString(num_list[i]);
            } else {
                odd += Integer.toString(num_list[i]);
            }
        }

        // 문자열로 바뀐 홀수와 짝수를 다시 정수형으로 변환하여 합하기
        answer = Integer.parseInt(even) + Integer.parseInt(odd);
        return answer;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]원소들의 곱과 합]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%9B%90%EC%86%8C%EB%93%A4%EC%9D%98-%EA%B3%B1%EA%B3%BC-%ED%95%A9</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%9B%90%EC%86%8C%EB%93%A4%EC%9D%98-%EA%B3%B1%EA%B3%BC-%ED%95%A9</guid>
            <pubDate>Mon, 07 Apr 2025 13:12:57 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>정수가 담긴 리스트 num_list가 주어질 때, 모든 원소들의 곱이 모든 원소들의 합의 제곱보다 작으면 1을 크면 0을 return하도록 solution 함수를 완성해주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>2 ≤ num_list의 길이 ≤ 10</li>
<li>1 ≤ num_list의 원소 ≤ 9</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>num_list</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>[3, 4, 5, 2, 1]</td>
<td>1</td>
</tr>
<tr>
<td>[5, 7, 8, 3]</td>
<td>0</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>모든 원소의 곱은 120, 합의 제곱은 225이므로 1을 return합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>모든 원소의 곱은 840, 합의 제곱은 529이므로 0을 return합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int[] num_list) {
        int answer = 0;

        // 원소들의 곱 &lt; 원소들의 합의 제곱 =&gt; 1 반환
        // 원소들의 곱 &gt; 원소들의 합의 제곱 =&gt; 0 반환

        int sum = 0;
        int mul = 1; 

        // 반복문을 통해서 원소들의 합과 곱의 결과값을 구하는 식
        for(int i = 0; i &lt; num_list.length; i++){
            sum += num_list[i];
            mul *= num_list[i];
        }

        if(sum * sum &gt; mul) {
            answer = 1;
        }
        return answer;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]등차수열의 특정한 항만 더하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%93%B1%EC%B0%A8%EC%88%98%EC%97%B4%EC%9D%98-%ED%8A%B9%EC%A0%95%ED%95%9C-%ED%95%AD%EB%A7%8C-%EB%8D%94%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%93%B1%EC%B0%A8%EC%88%98%EC%97%B4%EC%9D%98-%ED%8A%B9%EC%A0%95%ED%95%9C-%ED%95%AD%EB%A7%8C-%EB%8D%94%ED%95%98%EA%B8%B0</guid>
            <pubDate>Tue, 01 Apr 2025 14:30:52 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>두 정수 a, d와 길이가 n인 boolean 배열 included가 주어집니다. 첫째항이 a, 공차가 d인 등차수열에서 included[i]가 i + 1항을 의미할 때, 이 등차수열의 1항부터 n항까지 included가 true인 항들만 더한 값을 return 하는 solution 함수를 작성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ a ≤ 100</li>
<li>1 ≤ d ≤ 100</li>
<li>1 ≤ included의 길이 ≤ 100</li>
<li>included에는 true가 적어도 하나 존재합니다.</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>a</th>
<th>d</th>
<th>included</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>3</td>
<td>4</td>
<td>[true, false, false, true, true]</td>
<td>37</td>
</tr>
<tr>
<td>7</td>
<td>1</td>
<td>[false, false, false, true, false, false, false]</td>
<td>10</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>예제 1번은 <code>a</code>와 <code>d</code>가 각각 3, 4이고 <code>included</code>의 길이가 5입니다. 이를 표로 나타내면 다음과 같습니다.</li>
</ul>
<table>
<thead>
<tr>
<th></th>
<th>1항</th>
<th>2항</th>
<th>3항</th>
<th>4항</th>
<th>5항</th>
</tr>
</thead>
<tbody><tr>
<td>등차수열</td>
<td>3</td>
<td>7</td>
<td>11</td>
<td>15</td>
<td>19</td>
</tr>
<tr>
<td>included</td>
<td>true</td>
<td>false</td>
<td>false</td>
<td>true</td>
<td>true</td>
</tr>
</tbody></table>
<p><code>따라서 true에 해당하는 1항, 4항, 5항을 더한 3 + 15 + 19 = 37을 return 합니다.</code></p>
<p>입출력 예 #2</p>
<ul>
<li>예제 2번은 <code>a</code>와 <code>d</code>가 각각 7, 1이고 <code>included</code>의 길이가 7입니다. 이를 표로 나타내면 다음과 같습니다.</li>
</ul>
<table>
<thead>
<tr>
<th></th>
<th>1항</th>
<th>2항</th>
<th>3항</th>
<th>4항</th>
<th>5항</th>
<th>6항</th>
<th>7항</th>
</tr>
</thead>
<tbody><tr>
<td>등차수열</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
</tr>
<tr>
<td>included</td>
<td>false</td>
<td>false</td>
<td>false</td>
<td>true</td>
<td>false</td>
<td>false</td>
<td>false</td>
</tr>
</tbody></table>
<p><code>따라서 4항만 true이므로 10을 return 합니다.</code></p>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int a, int d, boolean[] included) {
        int answer = 0;
        // 등차수열 공식 : n번째 항 = a + (n − 1) * d

        for(int i = 0; i &lt; included.length; i++){ // i는 included의 인덱스
            // included[i]가 true일 때 항들만 더한 값 리턴
            if(included[i] == true) {
                answer += a + (i * d);
                continue;
            }
        }

        return answer;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]flag에 따라 다른 값 반환하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88flag%EC%97%90-%EB%94%B0%EB%9D%BC-%EB%8B%A4%EB%A5%B8-%EA%B0%92-%EB%B0%98%ED%99%98%ED%95%98%EA%B8%B0-dm6warc0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88flag%EC%97%90-%EB%94%B0%EB%9D%BC-%EB%8B%A4%EB%A5%B8-%EA%B0%92-%EB%B0%98%ED%99%98%ED%95%98%EA%B8%B0-dm6warc0</guid>
            <pubDate>Fri, 28 Mar 2025 13:13:28 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>두 정수 a, b와 boolean 변수 flag가 매개변수로 주어질 때, flag가 true면 a + b를 false면 a - b를 return 하는 solution 함수를 작성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>-1,000 ≤ a, b ≤ 1,000</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
<th>flag</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>-4</td>
<td>7</td>
<td>true</td>
<td>3</td>
</tr>
<tr>
<td>-4</td>
<td>7</td>
<td>false</td>
<td>-11</td>
</tr>
</tbody></table>
<h3 id="입출력-예-1">입출력 예</h3>
<p>입출력 예 #1</p>
<ul>
<li>예제 1번에서 flag가 true이므로 a + b = (-4) + 7 = 3을 return 합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>예제 2번에서 flag가 false이므로 a - b = (-4) - 7 = -11을 return 합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int a, int b, boolean flag) {

        if(flag == true) {
            return a + b;
        } else {
            return a - b;
        }
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]조건 문자열]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%A1%B0%EA%B1%B4-%EB%AC%B8%EC%9E%90%EC%97%B4</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EC%A1%B0%EA%B1%B4-%EB%AC%B8%EC%9E%90%EC%97%B4</guid>
            <pubDate>Thu, 27 Mar 2025 07:19:07 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>두 수가 n과 m이라면
&quot;&gt;&quot;, &quot;=&quot; : n &gt;= m
&quot;&lt;&quot;, &quot;=&quot; : n &lt;= m
&quot;&gt;&quot;, &quot;!&quot; : n &gt; m
&quot;&lt;&quot;, &quot;!&quot; : n &lt; m
두 문자열 ineq와 eq가 주어집니다. ineq는 &quot;&lt;&quot;와 &quot;&gt;&quot;중 하나고, eq는 &quot;=&quot;와 &quot;!&quot;중 하나입니다. 그리고 두 정수 n과 m이 주어질 때, n과 m이 ineq와 eq의 조건에 맞으면 1을 아니면 0을 return하도록 solution 함수를 완성해주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ n, m ≤ 100</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>ineq</th>
<th>eq</th>
<th>n</th>
<th>m</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>&quot;&lt;&quot;</td>
<td>&quot;=&quot;</td>
<td>20</td>
<td>50</td>
<td>1</td>
</tr>
<tr>
<td>&quot;&gt;&quot;</td>
<td>&quot;!&quot;</td>
<td>41</td>
<td>78</td>
<td>0</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>20 &lt;= 50은 참이기 때문에 1을 return합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>41 &gt; 78은 거짓이기 때문에 0을 return합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(String ineq, String eq, int n, int m) {
        if (ineq.equals(&quot;&gt;&quot;)) {
            if (eq.equals(&quot;=&quot;)) {
                return n &gt;= m ? 1 : 0;
            } else {
                return n &gt; m ? 1 : 0;
            }
        } else if (ineq.equals(&quot;&lt;&quot;)) {
            if (eq.equals(&quot;=&quot;)) {
                return n &lt;= m ? 1 : 0;
            } else {
                return n &lt; m ? 1 : 0;
            }
        }
        return 0;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]홀짝에 따라 다른 값 반환하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%ED%99%80%EC%A7%9D%EC%97%90-%EB%94%B0%EB%9D%BC-%EB%8B%A4%EB%A5%B8-%EA%B0%92-%EB%B0%98%ED%99%98%ED%95%98%EA%B8%B0-zi3gvn5k</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%ED%99%80%EC%A7%9D%EC%97%90-%EB%94%B0%EB%9D%BC-%EB%8B%A4%EB%A5%B8-%EA%B0%92-%EB%B0%98%ED%99%98%ED%95%98%EA%B8%B0-zi3gvn5k</guid>
            <pubDate>Wed, 26 Mar 2025 07:41:14 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>양의 정수 n이 매개변수로 주어질 때, n이 홀수라면 n 이하의 홀수인 모든 양의 정수의 합을 return 하고 n이 짝수라면 n 이하의 짝수인 모든 양의 정수의 제곱의 합을 return 하는 solution 함수를 작성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ n ≤ 100</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>n</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>7</td>
<td>16</td>
</tr>
<tr>
<td>10</td>
<td>220</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>예제 1번의 n은 7로 홀수입니다. 7 이하의 모든 양의 홀수는 1, 3, 5, 7이고 이들의 합인 1 + 3 + 5 + 7 = 16을 return 합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>예제 2번의 n은 10으로 짝수입니다. 10 이하의 모든 양의 짝수는 2, 4, 6, 8, 10이고 이들의 제곱의 합인 22 + 42 + 62 + 82 + 102 = 4 + 16 + 36 + 64 + 100 = 220을 return 합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int n) {
        int answer = 0;

        for(int i = 1; i &lt;= n; i++) {
            if(n % 2 == 1 &amp;&amp; i % 2 == 1) {
                answer += i;
            } else if(n % 2 == 0 &amp;&amp; i % 2 == 0){
                answer += i * i;
            }
        }

        return answer;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]공배수]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EA%B3%B5%EB%B0%B0%EC%88%98</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EA%B3%B5%EB%B0%B0%EC%88%98</guid>
            <pubDate>Mon, 24 Mar 2025 15:11:28 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>정수 number와 n, m이 주어집니다. number가 n의 배수이면서 m의 배수이면 1을 아니라면 0을 return하도록 solution 함수를 완성해주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>10 ≤ number ≤ 100</li>
<li>2 ≤ n, m &lt; 10</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>number</th>
<th>n</th>
<th>m</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>60</td>
<td>2</td>
<td>3</td>
<td>1</td>
</tr>
<tr>
<td>55</td>
<td>10</td>
<td>5</td>
<td>0</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>60은 2의 배수이면서 3의 배수이기 때문에 1을 return합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>55는 5의 배수이지만 10의 배수가 아니기 때문에 0을 return합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int number, int n, int m) {

        if(number % n == 0 &amp;&amp; number % m == 0) {
            return 1;
        } else {
            return 0;
        }
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]n의 배수]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88n%EC%9D%98-%EB%B0%B0%EC%88%98</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88n%EC%9D%98-%EB%B0%B0%EC%88%98</guid>
            <pubDate>Mon, 24 Mar 2025 08:26:11 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>정수 <code>num</code>과 <code>n</code>이 매개 변수로 주어질 때, <code>num</code>이 <code>n</code>의 배수이면 1을 return <code>n</code>의 배수가 아니라면 0을 return하도록 solution 함수를 완성해주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>2 ≤ <code>num</code> ≤ 100</li>
<li>2 ≤ <code>n</code> ≤ 9</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>num</th>
<th>n</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>98</td>
<td>2</td>
<td>1</td>
</tr>
<tr>
<td>34</td>
<td>3</td>
<td>0</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>98은 2의 배수이므로 1을 return합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>32는 3의 배수가 아니므로 0을 return합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int num, int n) {

        if (num % n == 0) {
            return 1;
        } else {
            return 0;
        }
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]두 수 연산값 비교하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%91%90-%EC%88%98-%EC%97%B0%EC%82%B0%EA%B0%92-%EB%B9%84%EA%B5%90%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%91%90-%EC%88%98-%EC%97%B0%EC%82%B0%EA%B0%92-%EB%B9%84%EA%B5%90%ED%95%98%EA%B8%B0</guid>
            <pubDate>Mon, 24 Mar 2025 08:21:26 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>연산 ⊕는 두 정수에 대한 연산으로 두 정수를 붙여서 쓴 값을 반환합니다. 예를 들면 다음과 같습니다.</p>
</blockquote>
<ul>
<li>12 ⊕ 3 = 123</li>
<li>3 ⊕ 12 = 312<blockquote>
<p>양의 정수 a와 b가 주어졌을 때, a ⊕ b와 2 * a * b 중 더 큰 값을 return하는 solution 함수를 완성해 주세요.
단, a ⊕ b와 2 * a * b가 같으면 a ⊕ b를 return 합니다.</p>
</blockquote>
</li>
</ul>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ a, b &lt; 10,000</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>2</td>
<td>91</td>
<td>364</td>
</tr>
<tr>
<td>91</td>
<td>2</td>
<td>912</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>a ⊕ b = 291 이고, 2 * a * b = 364 입니다. 둘 중 더 큰 값은 364 이므로 364를 return 합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>a ⊕ b = 912 이고, 2 * a * b = 364 입니다. 둘 중 더 큰 값은 912 이므로 912를 return 합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int a, int b) {

        String ab = Integer.toString(a) + Integer.toString(b);

        int val = Integer.parseInt(ab);
        int abVal = 2 * a * b;

        if(val &gt; abVal) {
            return val;
        } else {
            return abVal;
        }
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]더 크게 합치기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%8D%94-%ED%81%AC%EA%B2%8C-%ED%95%A9%EC%B9%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%8D%94-%ED%81%AC%EA%B2%8C-%ED%95%A9%EC%B9%98%EA%B8%B0</guid>
            <pubDate>Sat, 22 Mar 2025 05:15:01 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>연산 ⊕는 두 정수에 대한 연산으로 두 정수를 붙여서 쓴 값을 반환합니다. 예를 들면 다음과 같습니다.</p>
</blockquote>
<ul>
<li>12 ⊕ 3 = 123</li>
<li>3 ⊕ 12 = 312
양의 정수 a와 b가 주어졌을 때, a ⊕ b와 b ⊕ a 중 더 큰 값을 return 하는 solution 함수를 완성해 주세요.
단, a ⊕ b와 b ⊕ a가 같다면 a ⊕ b를 return 합니다.</li>
</ul>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ a, b &lt; 10,000</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>a</th>
<th>b</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>9</td>
<td>91</td>
<td>991</td>
</tr>
<tr>
<td>89</td>
<td>8</td>
<td>898</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>a ⊕ b = 991 이고, b ⊕ a = 919 입니다. 둘 중 더 큰 값은 991 이므로 991을 return 합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>a ⊕ b = 898 이고, b ⊕ a = 889 입니다. 둘 중 더 큰 값은 898 이므로 898을 return 합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public int solution(int a, int b) {

        // a와 b의 합 = ab
        String ab = Integer.toString(a) + Integer.toString(b);
        // b와 a의 합 = ba
        String ba = Integer.toString(b) + Integer.toString(a);

        // ab와 ba를 int로 변환하여 더 큰 값 출력
        int abVal = Integer.parseInt(ab);
        int baVal = Integer.parseInt(ba);

        return Math.max(abVal, baVal);
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]문자열 곱하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EA%B3%B1%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EA%B3%B1%ED%95%98%EA%B8%B0</guid>
            <pubDate>Sat, 22 Mar 2025 04:46:07 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>문자열 my_string과 정수 k가 주어질 때, my_string을 k번 반복한 문자열을 return 하는 solution 함수를 작성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ my_string의 길이 ≤ 100</li>
<li>my_string은 영소문자로만 이루어져 있습니다.</li>
<li>1 ≤ k ≤ 100</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>my_string</th>
<th>k</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>&quot;string&quot;</td>
<td>3</td>
<td>&quot;stringstringstring&quot;</td>
</tr>
<tr>
<td>&quot;love&quot;</td>
<td>10</td>
<td>&quot;lovelovelovelovelovelovelovelovelovelove&quot;</td>
</tr>
</tbody></table>
<h3 id="입출력-예-1">입출력 예</h3>
<p>입출력 예 #1</p>
<ul>
<li>예제 1번의 my_string은 &quot;string&quot;이고 이를 3번 반복한 문자열은 &quot;stringstringstring&quot;이므로 이를 return 합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>예제 2번의 my_string은 &quot;love&quot;이고 이를 10번 반복한 문자열은 &quot;lovelovelovelovelovelovelovelovelovelove&quot;이므로 이를 return 합니다.</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public String solution(String my_string, int k) {
        String answer = &quot;&quot;;

        for(int i = 0; i &lt; k; i++){
            answer = answer + my_string;
        }
        return answer;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]문자 리스트를 문자열로 변환하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90-%EB%A6%AC%EC%8A%A4%ED%8A%B8%EB%A5%BC-%EB%AC%B8%EC%9E%90%EC%97%B4%EB%A1%9C-%EB%B3%80%ED%99%98%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90-%EB%A6%AC%EC%8A%A4%ED%8A%B8%EB%A5%BC-%EB%AC%B8%EC%9E%90%EC%97%B4%EB%A1%9C-%EB%B3%80%ED%99%98%ED%95%98%EA%B8%B0</guid>
            <pubDate>Fri, 21 Mar 2025 13:21:19 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>문자들이 담겨있는 배열 <code>arr</code>가 주어집니다. <code>arr</code>의 원소들을 순서대로 이어 붙인 문자열을 return 하는 solution함수를 작성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li><p>1 ≤ <code>arr</code>의 길이 ≤ 200</p>
<ul>
<li><code>arr</code>의 원소는 전부 알파벳 소문자로 이루어진 길이가 1인 문자열입니다.</li>
</ul>
</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>arr</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>[&quot;a&quot;,&quot;b&quot;,&quot;c&quot;]</td>
<td>&quot;abc&quot;</td>
</tr>
</tbody></table>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public String solution(String[] arr) {
        String answer = &quot;&quot;;

        for(int i = 0; i &lt; arr.length; i++){
            answer = answer + arr[i];
        }
        return answer;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]문자열 섞기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EC%84%9E%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EC%84%9E%EA%B8%B0</guid>
            <pubDate>Fri, 21 Mar 2025 12:52:23 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>길이가 같은 두 문자열 <code>str1</code>과 <code>str2</code>가 주어집니다.
두 문자열의 각 문자가 앞에서부터 서로 번갈아가면서 한 번씩 등장하는 문자열을 만들어 return 하는 solution 함수를 완성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li><p>1 ≤ str1의 길이 = str2의 길이 ≤ 10</p>
<ul>
<li>str1과 str2는 알파벳 소문자로 이루어진 문자열입니다.</li>
</ul>
</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>str1</th>
<th>str2</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>&quot;aaaaa&quot;</td>
<td>&quot;bbbbb&quot;</td>
<td>&quot;ababababab&quot;</td>
</tr>
</tbody></table>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public String solution(String str1, String str2) {
        String answer = &quot;&quot;;

        for(int i = 0; i &lt; str1.length(); i++){
            answer = answer + str1.charAt(i) + str2.charAt(i);
        }
        return answer;
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]문자열 겹쳐쓰기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EA%B2%B9%EC%B3%90%EC%93%B0%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EA%B2%B9%EC%B3%90%EC%93%B0%EA%B8%B0</guid>
            <pubDate>Thu, 20 Mar 2025 09:23:28 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>문자열 <code>my_string</code>, <code>overwrite_string</code>과 정수 <code>s</code>가 주어집니다. 문자열 <code>my_string</code>의 인덱스 <code>s</code>부터 <code>overwrite_string</code>의 길이만큼을 문자열 <code>overwrite_string</code>으로 바꾼 문자열을 return 하는 solution 함수를 작성해 주세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li><code>my_string</code>와 <code>overwrite_string</code>은 숫자와 알파벳으로 이루어져 있습니다.</li>
<li>1 ≤ <code>overwrite_string</code>의 길이 ≤ <code>my_string</code>의 길이 ≤ 1,000</li>
<li>0 ≤ s ≤ <code>my_string</code>의 길이 - <code>overwrite_string</code>의 길이</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<table>
<thead>
<tr>
<th>my_string</th>
<th>overwrite_string</th>
<th>s</th>
<th>result</th>
</tr>
</thead>
<tbody><tr>
<td>&quot;He11oWor1d&quot;</td>
<td>&quot;lloWorl&quot;</td>
<td>2</td>
<td>&quot;HelloWorld&quot;</td>
</tr>
<tr>
<td>&quot;Program29b8UYP&quot;</td>
<td>&quot;merS123&quot;</td>
<td>7</td>
<td>&quot;ProgrammerS123&quot;</td>
</tr>
</tbody></table>
<h3 id="입출력-예-설명">입출력 예 설명</h3>
<p>입출력 예 #1</p>
<ul>
<li>예제 1번의 my_string에서 인덱스 2부터 overwrite_string의 길이만큼에 해당하는 부분은 &quot;11oWor1&quot;이고 이를 &quot;lloWorl&quot;로 바꾼 &quot;HelloWorld&quot;를 return 합니다.</li>
</ul>
<p>입출력 예 #2</p>
<ul>
<li>예제 2번의 my_string에서 인덱스 7부터 overwrite_string의 길이만큼에 해당하는 부분은 &quot;29b8UYP&quot;이고 이를 &quot;merS123&quot;로 바꾼 &quot;ProgrammerS123&quot;를 return 합니다.</li>
</ul>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">class Solution {
    public String solution(String my_string, String overwrite_string, int s) {
        String answer = &quot;&quot;;

        int len1 = overwrite_string.length();
        int len2 = my_string.length();

        answer = my_string.substring(0, s) + overwrite_string + my_string.substring((len1 + s), len2);

        return answer;
    }
}</code></pre>
<hr>
<p><img src="https://velog.velcdn.com/images/lu__study__log/post/71c1c68d-b4c1-4b86-8b7a-f5e7af5793d7/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]홀짝 구분하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%ED%99%80%EC%A7%9D-%EA%B5%AC%EB%B6%84%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%ED%99%80%EC%A7%9D-%EA%B5%AC%EB%B6%84%ED%95%98%EA%B8%B0</guid>
            <pubDate>Thu, 20 Mar 2025 08:51:40 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>자연수 n이 입력으로 주어졌을 때 만약 n이 짝수이면 &quot;n is even&quot;을, 홀수이면 &quot;n is odd&quot;를 출력하는 코드를 작성해 보세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ n ≤ 1,000</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<p>입력 #1</p>
<ul>
<li>100</li>
</ul>
<p>출력 #1</p>
<ul>
<li>100 is even</li>
</ul>
<p>입력 #2</p>
<ul>
<li>1</li>
</ul>
<p>출력 #2</p>
<ul>
<li>1 is odd</li>
</ul>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        if(n % 2 == 0) {
            System.out.println(n + &quot; is even&quot;);
        } else {
            System.out.println(n + &quot; is odd&quot;);
        }
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]문자열 돌리기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EB%8F%8C%EB%A6%AC%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EB%8F%8C%EB%A6%AC%EA%B8%B0</guid>
            <pubDate>Wed, 19 Mar 2025 11:05:42 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>문자열 str이 주어집니다.
문자열을 시계방향으로 90도 돌려서 아래 입출력 예와 같이 출력하는 코드를 작성해 보세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ str의 길이 ≤ 10</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<p>입력 #1</p>
<ul>
<li>abcde</li>
</ul>
<p>출력 #1
a
b
c
d
e</p>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();

        for(int i = 0; i &lt; a.length(); i++) {
            System.out.println(a.charAt(i));
        }
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]문자열 붙여서 출력하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EB%B6%99%EC%97%AC%EC%84%9C-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%AC%B8%EC%9E%90%EC%97%B4-%EB%B6%99%EC%97%AC%EC%84%9C-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0</guid>
            <pubDate>Wed, 19 Mar 2025 10:50:00 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>두 개의 문자열 str1, str2가 공백으로 구분되어 입력으로 주어집니다.
입출력 예와 같이 str1과 str2을 이어서 출력하는 코드를 작성해 보세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ str1, str2의 길이 ≤ 10</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<p>입력 #1</p>
<ul>
<li>apple pen</li>
</ul>
<p>출력 #1</p>
<ul>
<li>applepen</li>
</ul>
<p>입력 #2</p>
<ul>
<li>Hello World!</li>
</ul>
<p>출력 #2</p>
<ul>
<li>HelloWorld!</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String b = sc.next();

        if(a.length() &gt;= 1 &amp;&amp; a.length() &lt;= 10 &amp;&amp; b.length() &gt;= 1 &amp;&amp; b.length() &lt;= 10) {
            // concat() : 문자열 붙이기
        String answer = a.concat(b);

        System.out.println(answer);
        }
    }
}</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]특수문자 출력하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%ED%8A%B9%EC%88%98%EB%AC%B8%EC%9E%90-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%ED%8A%B9%EC%88%98%EB%AC%B8%EC%9E%90-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0</guid>
            <pubDate>Mon, 17 Mar 2025 15:09:42 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>다음과 같이 출력하도록 코드를 작성해 주세요.</p>
</blockquote>
<h3 id="출력-예시">출력 예시</h3>
<p>!@#$%^&amp;*(&#39;&quot;&lt;&gt;?:;</p>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        System.out.print(&quot;!@#$%^&amp;*(\\&#39;\&quot;&lt;&gt;?:;&quot;);
    }
}</code></pre>
<hr>
<h3 id="이스케이프-문자">이스케이프 문자</h3>
<p><img src="https://velog.velcdn.com/images/lu__study__log/post/8ca2a4f2-0141-4ef0-a07b-7ca8d8e94d61/image.png" alt="이스케이프 문자"></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[프로그래머스_기초]대소문자 바꿔서 출력하기]]></title>
            <link>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%8C%80%EC%86%8C%EB%AC%B8%EC%9E%90-%EB%B0%94%EA%BF%94%EC%84%9C-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0</link>
            <guid>https://velog.io/@lu__study__log/%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%EA%B8%B0%EC%B4%88%EB%8C%80%EC%86%8C%EB%AC%B8%EC%9E%90-%EB%B0%94%EA%BF%94%EC%84%9C-%EC%B6%9C%EB%A0%A5%ED%95%98%EA%B8%B0</guid>
            <pubDate>Mon, 17 Mar 2025 06:48:05 GMT</pubDate>
            <description><![CDATA[<h3 id="문제">문제</h3>
<blockquote>
<p>영어 알파벳으로 이루어진 문자열 str이 주어집니다. 각 알파벳을 대문자는 소문자로 소문자는 대문자로 변환해서 출력하는 코드를 작성해 보세요.</p>
</blockquote>
<h3 id="제한사항">제한사항</h3>
<ul>
<li>1 ≤ str의 길이 ≤ 20</li>
<li>str은 알파벳으로 이루어진 문자열입니다.</li>
</ul>
<h3 id="입출력-예">입출력 예</h3>
<p>입력 #1</p>
<ul>
<li>aBcDeFg</li>
</ul>
<p>출력 #1</p>
<ul>
<li>AbCdEfG</li>
</ul>
<hr>
<h3 id="풀이">풀이</h3>
<pre><code class="language-java">import java.util.Scanner;

public class Solution {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.next();
        String answer = &quot;&quot;;

        for(int i = 0; i &lt; a.length(); i++) {
            char c = a.charAt(i);
            if(Character.isUpperCase(c)) {
                answer += Character.toLowerCase(c);
            } else {
                answer += Character.toUpperCase(c);
            }
        }
        System.out.println(answer.toString());
    }
}</code></pre>
<hr>
<p><code>Character.isUpperCase()</code> </p>
<ul>
<li>해당 문자가 <strong>대문자인지 확인</strong>하는 메서드</li>
<li>반환값: true (대문자), false (소문자 또는 다른 문자)</li>
<li>원본 문자를 변경하지 않음</li>
</ul>
<p><code>Character.toUpperCase()</code></p>
<ul>
<li>해당 문자를 <strong>대문자로 변환</strong>하는 메서드</li>
<li>소문자라면 대문자로 변환하여 반환, 대문자라면 그대로 반환</li>
<li>변환할 수 없는 경우 원래 문자를 그대로 반환</li>
</ul>
]]></description>
        </item>
    </channel>
</rss>