<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>mintheon's zone</title>
    <link>https://bk-coding.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Wed, 15 Jul 2026 14:45:18 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>mintheon</managingEditor>
    <image>
      <title>mintheon's zone</title>
      <url>https://tistory1.daumcdn.net/tistory/3069966/attach/bb31fa641aa44cc7b6b0665fd76767c6</url>
      <link>https://bk-coding.tistory.com</link>
    </image>
    <item>
      <title>[1699] 제곱수의 합</title>
      <link>https://bk-coding.tistory.com/18</link>
      <description></description>
      <category>Algorithm/C++</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/18</guid>
      <comments>https://bk-coding.tistory.com/18#entry18comment</comments>
      <pubDate>Wed, 3 Apr 2019 00:15:33 +0900</pubDate>
    </item>
    <item>
      <title>[2741] N 찍기 (시간 초과 날 경우)</title>
      <link>https://bk-coding.tistory.com/10</link>
      <description>&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; color: rgb(51, 51, 51); font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;page-header&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; padding-bottom: 9px; margin: 40px 0px 20px; border-bottom: 1px solid rgb(238, 238, 238);&quot;&gt;&lt;h1 style=&quot;box-sizing: border-box; margin: 5px 0px 10px; font-size: 28px; font-weight: normal; line-height: 35px; color: rgb(88, 95, 105); text-shadow: none; border-radius: 0px !important;&quot;&gt;&lt;span id=&quot;problem_title&quot; class=&quot;&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;N 찍기&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;label label-success problem-label&quot; style=&quot;box-sizing: border-box; border-radius: 0.25em; display: inline; padding: 4px 7px; font-size: 11px; line-height: 1; color: rgb(255, 255, 255); text-align: center; white-space: nowrap; vertical-align: baseline; background-color: rgb(92, 184, 92);&quot;&gt;성공&lt;/span&gt;&lt;div class=&quot;btn-group pull-right problem-button&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; display: inline-block; vertical-align: middle; float: right;&quot;&gt;&lt;button class=&quot;btn btn-default&quot; type=&quot;button&quot; id=&quot;favorite_button&quot; data-favorite=&quot;0&quot; style=&quot;border-radius: 4px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; color: rgb(51, 51, 51); overflow: visible; cursor: pointer; padding: 6px 12px; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; background-image: none; border-width: 1px; border-style: solid; border-color: rgb(204, 204, 204); background-color: rgb(255, 255, 255); box-shadow: none; position: relative; float: left; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif !important; outline: 0px !important;&quot;&gt;&lt;span class=&quot;glyphicon glyphicon-star-empty&quot; id=&quot;favorite_image&quot; style=&quot;box-sizing: border-box; position: relative; top: 1px; display: inline-block; font-family: &amp;quot;Glyphicons Halflings&amp;quot;; line-height: 1; -webkit-font-smoothing: antialiased; border-radius: 0px !important;&quot;&gt;&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; color: rgb(51, 51, 51); font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;table-responsive&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;table class=&quot;table&quot; id=&quot;problem-info&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; border-spacing: 0px; border-collapse: collapse; background-color: transparent; width: 720px; max-width: 100%; margin-bottom: 20px;&quot;&gt;&lt;thead style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 116px;&quot;&gt;시간 제한&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 116px;&quot;&gt;메모리 제한&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;제출&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;정답&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;맞은 사람&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;정답 비율&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;1 초&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;128 MB&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;82362&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;35115&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;30350&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;45.108%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id=&quot;problem-body&quot; style=&quot;box-sizing: border-box; color: rgb(51, 51, 51); font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;description&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;문제&lt;/h2&gt;&lt;/div&gt;&lt;div id=&quot;problem_description&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; font-size: medium; line-height: 30px;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; color: rgb(85, 85, 85); border-radius: 0px !important;&quot;&gt;자연수 N이 주어졌을 때, 1부터 N까지 한 줄에 하나씩 출력하는 프로그램을 작성하시오.&lt;/p&gt;&lt;/div&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;input&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;입력&lt;/h2&gt;&lt;/div&gt;&lt;div id=&quot;problem_input&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; font-size: medium; line-height: 30px;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; color: rgb(85, 85, 85); border-radius: 0px !important;&quot;&gt;첫째 줄에 100,000보다 작거나 같은 자연수 N이 주어진다.&lt;/p&gt;&lt;/div&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;output&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;출력&lt;/h2&gt;&lt;/div&gt;&lt;div id=&quot;problem_output&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; font-size: medium; line-height: 30px;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; color: rgb(85, 85, 85); border-radius: 0px !important;&quot;&gt;첫째 줄부터 N번째 줄 까지 차례대로 출력한다.&lt;/p&gt;&lt;/div&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;div class=&quot;row&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; margin-right: -15px; margin-left: -15px;&quot;&gt;&lt;div class=&quot;col-md-6&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;sampleinput1&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;예제 입력 1&amp;nbsp;&lt;button type=&quot;button&quot; class=&quot;btn btn-link copy-button&quot; data-clipboard-target=&quot;#sample-input-1&quot; style=&quot;border-radius: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; color: rgb(66, 139, 202); overflow: visible; cursor: pointer; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; background-image: none; border-width: 1px; border-style: solid; border-color: transparent; box-shadow: none; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif !important; outline: 0px !important;&quot;&gt;복사&lt;/button&gt;&lt;/h2&gt;&lt;/div&gt;&lt;pre class=&quot;sampledata&quot; id=&quot;sample-input-1&quot; style=&quot;box-sizing: border-box; border-radius: 5px; overflow: scroll auto; font-family: Menlo, Monaco, &amp;quot;Source Code Pro&amp;quot;, consolas, monospace; font-size: 18px; padding: 8px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: normal; overflow-wrap: normal; background-color: rgb(247, 247, 249); border: 1px solid rgb(225, 225, 232);&quot;&gt;5&lt;/pre&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-6&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;sampleoutput1&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;예제 출력 1&amp;nbsp;&lt;button type=&quot;button&quot; class=&quot;btn btn-link copy-button&quot; data-clipboard-target=&quot;#sample-output-1&quot; style=&quot;border-radius: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; color: rgb(66, 139, 202); overflow: visible; cursor: pointer; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; background-image: none; border-width: 1px; border-style: solid; border-color: transparent; box-shadow: none; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif !important; outline: 0px !important;&quot;&gt;복사&lt;/button&gt;&lt;/h2&gt;&lt;/div&gt;&lt;pre class=&quot;sampledata&quot; id=&quot;sample-output-1&quot; style=&quot;box-sizing: border-box; border-radius: 5px; overflow: scroll auto; font-family: Menlo, Monaco, &amp;quot;Source Code Pro&amp;quot;, consolas, monospace; font-size: 18px; padding: 8px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: normal; overflow-wrap: normal; background-color: rgb(247, 247, 249); border: 1px solid rgb(225, 225, 232);&quot;&gt;1
2
3
4
5&lt;/pre&gt;&lt;/section&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;정~말 쉬운 문제이다.&lt;/p&gt;
&lt;p&gt;하지만 이것도 코드를 제출하니 &lt;b&gt;&lt;span style=&quot;color: rgb(152, 0, 0); font-size: 12pt;&quot;&gt;&quot;시간 초과&quot;&lt;/span&gt;&lt;/b&gt; 에러가 났다. 하.. 도대체 뭘까.. 싶어서 알아봤다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;결과적으로 C를 사용하면 상관이 없지만 C++을 사용할 경우에는 오류가 날 수 있더라.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;C++의 'cin' 과 'cout' 이 C의 'scanf' 와 'printf' 에 비해서 굉장히 속도가 느리다고 한다.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;'#include&amp;lt;iostream&amp;gt;' 이 C++ 환경에서도 C 함수를 쓸 수 있도록&amp;nbsp;&amp;nbsp;'#include&amp;lt;cstdio&amp;gt;'를 포함시키면서 굉장히 느려진다고 한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;제일 좋은 방식은 시간 초과가 나는 경우 'cin' 이나 'cout' 대신 'scanf' 와 'printf'를 쓰는 것이지만..&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;굳이 사용하고 싶다면 소스 코드 위쪽에 요놈들을 적자.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:cpp &quot;&gt;sync_with_stdio(false);
cin.tie(null);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;u&gt;대신 이경우 'cstdio'를 싱크시키지 않기때문에 C에서의 함수는 사용할 수 없다.&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;위 코드 사용시 주의사항&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;ol style=&quot;list-style-type: decimal;&quot;&gt;&lt;li&gt;'scanf', 'printf'와 섞어서 사용하지 말 것&lt;/li&gt;&lt;li&gt;싱글 쓰레드 환경에서만 사용할 것 (PS용으론 상관없지만, 실무에서는 쓰지 말 것)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 11pt;&quot;&gt;그냥 웬만해서&amp;nbsp;시간초과가 난다면 'printf', 'scanf' 등의 C 표준 입출력 함수들을 사용하자.. ㅠㅠ&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;실패한 코드&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:cpp&quot;&gt;//2741
#include ⁢iostream&amp;gt;

using namespace std;

int main() {
	int n;

	cin &amp;gt;&amp;gt; n;

	for (int i = 0; i &amp;lt; n; i++) {
		cout &amp;lt;&amp;lt; i + 1 &amp;lt;&amp;lt; endl;
	}

	return 0;
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;성공한 코드&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:cpp&quot;&gt;//2741
#include &amp;it;⁢⁢iostream&amp;gt;

using namespace std;

int main() {
	int n;
	
	scanf(&quot;%d&quot;, &amp;amp;n);

	for (int i = 0; i &amp;lt; n; i++) {
		printf(&quot;%d\n&quot;, i + 1);
	}

	return 0;
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description>
      <category>Algorithm/C++</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/10</guid>
      <comments>https://bk-coding.tistory.com/10#entry10comment</comments>
      <pubDate>Tue, 19 Mar 2019 15:52:27 +0900</pubDate>
    </item>
    <item>
      <title>[10951] A+B - 4 (입력 종료 조건이 없을 때)</title>
      <link>https://bk-coding.tistory.com/9</link>
      <description>&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; color: rgb(51, 51, 51); font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;page-header&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; padding-bottom: 9px; margin: 40px 0px 20px; border-bottom: 1px solid rgb(238, 238, 238);&quot;&gt;&lt;h1 style=&quot;box-sizing: border-box; margin: 5px 0px 10px; font-size: 28px; font-weight: normal; line-height: 35px; color: rgb(88, 95, 105); text-shadow: none; border-radius: 0px !important;&quot;&gt;&lt;span id=&quot;problem_title&quot; class=&quot;&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;A+B - 4&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;label label-success problem-label&quot; style=&quot;box-sizing: border-box; border-radius: 0.25em; display: inline; padding: 4px 7px; font-size: 11px; line-height: 1; color: rgb(255, 255, 255); text-align: center; white-space: nowrap; vertical-align: baseline; background-color: rgb(92, 184, 92);&quot;&gt;성공&lt;/span&gt;&lt;div class=&quot;btn-group pull-right problem-button&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; display: inline-block; vertical-align: middle; float: right;&quot;&gt;&lt;button class=&quot;btn btn-default&quot; type=&quot;button&quot; id=&quot;favorite_button&quot; data-favorite=&quot;0&quot; style=&quot;border-radius: 4px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; color: rgb(51, 51, 51); overflow: visible; cursor: pointer; padding: 6px 12px; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; background-image: none; border-width: 1px; border-style: solid; border-color: rgb(204, 204, 204); background-color: rgb(255, 255, 255); box-shadow: none; position: relative; float: left; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif !important; outline: 0px !important;&quot;&gt;&lt;span class=&quot;glyphicon glyphicon-star-empty&quot; id=&quot;favorite_image&quot; style=&quot;box-sizing: border-box; position: relative; top: 1px; display: inline-block; font-family: &amp;quot;Glyphicons Halflings&amp;quot;; line-height: 1; -webkit-font-smoothing: antialiased; border-radius: 0px !important;&quot;&gt;&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;/h1&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; color: rgb(51, 51, 51); font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;table-responsive&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;table class=&quot;table&quot; id=&quot;problem-info&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; border-spacing: 0px; border-collapse: collapse; background-color: transparent; width: 720px; max-width: 100%; margin-bottom: 20px;&quot;&gt;&lt;thead style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 116px;&quot;&gt;시간 제한&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 116px;&quot;&gt;메모리 제한&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;제출&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;정답&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;맞은 사람&lt;/th&gt;&lt;th style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; text-align: left; line-height: 1.42857; vertical-align: bottom; border-top: 0px; border-bottom: none; width: 122px;&quot;&gt;정답 비율&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;tr style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;1 초&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;256 MB&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;21381&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;8229&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;6855&lt;/td&gt;&lt;td style=&quot;box-sizing: border-box; border-radius: 0px !important; padding: 8px; line-height: 1.42857; vertical-align: top; border-top: 1px solid rgb(221, 221, 221);&quot;&gt;40.627%&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id=&quot;problem-body&quot; style=&quot;box-sizing: border-box; color: rgb(51, 51, 51); font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;description&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;문제&lt;/h2&gt;&lt;/div&gt;&lt;div id=&quot;problem_description&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; font-size: medium; line-height: 30px;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; color: rgb(85, 85, 85); border-radius: 0px !important;&quot;&gt;두 정수 A와 B를 입력받은 다음, A+B를 출력하는 프로그램을 작성하시오.&lt;/p&gt;&lt;/div&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;input&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;입력&lt;/h2&gt;&lt;/div&gt;&lt;div id=&quot;problem_input&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; font-size: medium; line-height: 30px;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; color: rgb(85, 85, 85); border-radius: 0px !important;&quot;&gt;입력은 여러 개의 테스트 케이스로 이루어져 있다.&lt;/p&gt;
&lt;p style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; color: rgb(85, 85, 85); border-radius: 0px !important;&quot;&gt;각 테스트 케이스는 한 줄로 이루어져 있으며, 각 줄에 A와 B가 주어진다. (0 &amp;lt; A, B &amp;lt; 10)&lt;/p&gt;&lt;/div&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;output&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;출력&lt;/h2&gt;&lt;/div&gt;&lt;div id=&quot;problem_output&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; font-size: medium; line-height: 30px;&quot;&gt;&lt;p style=&quot;box-sizing: border-box; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; color: rgb(85, 85, 85); border-radius: 0px !important;&quot;&gt;각 테스트 케이스마다 A+B를 출력한다.&lt;/p&gt;&lt;/div&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-12&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;div class=&quot;row&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; margin-right: -15px; margin-left: -15px;&quot;&gt;&lt;div class=&quot;col-md-6&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;sampleinput1&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;예제 입력 1&amp;nbsp;&lt;button type=&quot;button&quot; class=&quot;btn btn-link copy-button&quot; data-clipboard-target=&quot;#sample-input-1&quot; style=&quot;border-radius: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; color: rgb(66, 139, 202); overflow: visible; cursor: pointer; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; background-image: none; border-width: 1px; border-style: solid; border-color: transparent; box-shadow: none; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif !important; outline: 0px !important;&quot;&gt;복사&lt;/button&gt;&lt;/h2&gt;&lt;/div&gt;&lt;pre class=&quot;sampledata&quot; id=&quot;sample-input-1&quot; style=&quot;box-sizing: border-box; border-radius: 5px; overflow: scroll auto; font-family: Menlo, Monaco, &amp;quot;Source Code Pro&amp;quot;, consolas, monospace; font-size: 18px; padding: 8px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: normal; overflow-wrap: normal; background-color: rgb(247, 247, 249); border: 1px solid rgb(225, 225, 232);&quot;&gt;1 1
2 3
3 4
9 8
5 2
&lt;/pre&gt;&lt;/section&gt;&lt;/div&gt;&lt;div class=&quot;col-md-6&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important; position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;&quot;&gt;&lt;section id=&quot;sampleoutput1&quot; style=&quot;box-sizing: border-box; border-radius: 0px !important;&quot;&gt;&lt;div class=&quot;headline&quot; style=&quot;box-sizing: border-box; margin: 10px 0px 25px; border-bottom: 1px dotted rgb(228, 233, 240); border-radius: 0px !important;&quot;&gt;&lt;h2 style=&quot;box-sizing: border-box; font-weight: normal; line-height: 33px; color: rgb(88, 95, 105); margin: 0px 0px -2px; font-size: 22px; text-shadow: none; padding-bottom: 5px; display: inline-block; border-bottom: 2px solid rgb(0, 118, 192); border-radius: 0px !important;&quot;&gt;예제 출력 1&amp;nbsp;&lt;button type=&quot;button&quot; class=&quot;btn btn-link copy-button&quot; data-clipboard-target=&quot;#sample-output-1&quot; style=&quot;border-radius: 0px; font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; color: rgb(66, 139, 202); overflow: visible; cursor: pointer; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; background-image: none; border-width: 1px; border-style: solid; border-color: transparent; box-shadow: none; font-family: &amp;quot;Open Sans&amp;quot;, &amp;quot;Apple SD Gothic Neo&amp;quot;, &amp;quot;Noto Sans CJK KR&amp;quot;, &amp;quot;Noto Sans KR&amp;quot;, 나눔바른고딕, 나눔고딕, 맑은고딕, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif !important; outline: 0px !important;&quot;&gt;복사&lt;/button&gt;&lt;/h2&gt;&lt;/div&gt;&lt;pre class=&quot;sampledata&quot; id=&quot;sample-output-1&quot; style=&quot;box-sizing: border-box; border-radius: 5px; overflow: scroll auto; font-family: Menlo, Monaco, &amp;quot;Source Code Pro&amp;quot;, consolas, monospace; font-size: 18px; padding: 8px; margin-top: 0px; margin-bottom: 10px; line-height: 1.42857; word-break: normal; overflow-wrap: normal; background-color: rgb(247, 247, 249); border: 1px solid rgb(225, 225, 232);&quot;&gt;2
5
7
17
7&lt;/pre&gt;&lt;/section&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;문제는 정말 간단하나 &lt;b&gt;&lt;span style=&quot;font-size: 12pt; color: rgb(152, 0, 0);&quot;&gt;&quot;출력 초과&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; color: rgb(152, 0, 0);&quot;&gt;&quot;&lt;/span&gt;&lt;/b&gt; 라는 에러메세지가 떴다. 이게 무슨 메세지일까 검색을 해봤다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(152, 0, 0);&quot;&gt;&quot;프로그램이 무한 루프에 빠졌을 때&quot;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;아니.. 그러라고 만든 문제 아닌가? 라고 생각했는데, 내가 EOF에 대한 개념이 없었던 거였다.. 나의 무지함..&lt;/div&gt;&lt;div&gt;&lt;u style=&quot;&quot;&gt;&lt;b&gt;이 경우에 EOF를 입력 받을때 프로그램을 종료 시켜야하기 때문에 해당 조건을 넣어줘야한다.&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: 18pt; color: rgb(0, 0, 0);&quot;&gt;&lt;b&gt;잘못된 코드&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:cpp &quot;&gt; //10951
#include &amp;lt;iostream&amp;gt;

using namespace std;

int main() {
	int a, b;

	while (true) {
        cin &amp;gt;&amp;gt; a &amp;gt;&amp;gt; b

		cout &amp;lt;&amp;lt; a + b &amp;lt;&amp;lt; endl;
	}

	return 0;
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;이 경우 프로그램이 종료되지 못하고 계속 무한루프를 돌기 때문에 '출력 초과' 라는 에러가 뜬다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;그래서 EOF를 입력 받을때 프로그램을 종료 시키기 위해 while 조건문 안에서 입력을 제대로 받았는지 처리해줘야한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;해결방법 - C&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush: c&quot;&gt;while (scanf(&quot;%d %d&quot;,&amp;amp;a,&amp;amp;b) != EOF) { } &lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-size: 18pt;&quot;&gt;해결방법 - C++&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;pre class=&quot;brush: cpp&quot;&gt; while (cin &amp;gt;&amp;gt; a &amp;gt;&amp;gt; b) { }
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;성공한 코드&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:cpp &quot;&gt;//10951
#include &amp;lt;iostream&amp;gt;

using namespace std;

int main() {
	int a, b;

	while (cin &amp;gt;&amp;gt; a &amp;gt;&amp;gt; b) {

		cout &amp;lt;&amp;lt; a + b &amp;lt;&amp;lt; endl;
	}

	return 0;
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</description>
      <category>Algorithm/C++</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/9</guid>
      <comments>https://bk-coding.tistory.com/9#entry9comment</comments>
      <pubDate>Tue, 19 Mar 2019 15:09:31 +0900</pubDate>
    </item>
    <item>
      <title>우분투의 VSCode 와 Git 연동하기</title>
      <link>https://bk-coding.tistory.com/8</link>
      <description>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>OS/Ubuntu</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/8</guid>
      <comments>https://bk-coding.tistory.com/8#entry8comment</comments>
      <pubDate>Thu, 14 Mar 2019 15:28:27 +0900</pubDate>
    </item>
    <item>
      <title>윈도우와 우분투 듀얼 부팅시 시간이 맞지 않는 문제</title>
      <link>https://bk-coding.tistory.com/7</link>
      <description>&lt;p&gt;윈도우와 우분투를 듀얼 부팅할 경우 시간이 맞지 않는 문제가 발생한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;리눅스는 UTC를 이용하고, 윈도우는 로컬타임을 이용하기때문에 생기는 문제이다. 때문에 듀얼부팅을 할경우 시간이 맞지 않아진다.&lt;/p&gt;&lt;p&gt;따라서 두 OS간의 시간 표기 방법을 일치시킬 필요가 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;일반적으로 리눅스에서 로컬타임을 쓰도록 바꾸는것이 편하기 때문에 이 방법을 사용한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;해당 명령어를 우분투 터미널에서 실행하면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:bash&quot;&gt;timedatectl set-local-rtc 1
&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;다시 UTC로 바꾸고 싶다면 맨 뒤의 숫자를 '0'으로 바꿔주면 된다.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>OS/Ubuntu</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/7</guid>
      <comments>https://bk-coding.tistory.com/7#entry7comment</comments>
      <pubDate>Thu, 14 Mar 2019 15:03:29 +0900</pubDate>
    </item>
    <item>
      <title>우분투에 플래시 플레이어 설치</title>
      <link>https://bk-coding.tistory.com/6</link>
      <description>&lt;p&gt;우분투에서 티스토리 블로그에 사진을 올리려고 하니 플래시 플레이어가 필요하대서.. 설치하려고하는데..&lt;/p&gt;&lt;p&gt;이것도 참 힘들다.. ㅠㅠ&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;Flash Player 설치&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://archive.canonical.com/pool/partner/a/adobe-flashplugin/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://archive.canonical.com/pool/partner/a/adobe-flashplugin/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;별거없다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;다른곳에서는 tar을 받아서 풀어서 넣으라느니, yum을 뭐시라.. 하는데 그냥 여기서 나한테 맞는 .deb 파일을 받으면 된다.&lt;/p&gt;&lt;p&gt;대신 재시작은 필수.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;그런데..&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;나는 사실 저걸 받고도 실행이 안됐다. 뭐지 뭐지..&amp;nbsp;&lt;/p&gt;&lt;p&gt;근데 나는 이때까지 'Chromium'으로 사용하고 있었다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;'크롬'은 플래시 기본 지원일텐데.. 싶어서.. 크롬 공식홈페이지에서 다운받아서 설치하고 실행하니..&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;&lt;u&gt;바로 된다... 그냥 '크롬'만 깔아도 됐지 않았나 싶다 ㅠㅠㅠ&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>OS/Ubuntu</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/6</guid>
      <comments>https://bk-coding.tistory.com/6#entry6comment</comments>
      <pubDate>Wed, 13 Mar 2019 20:44:04 +0900</pubDate>
    </item>
    <item>
      <title>우분투에 Visual Studio Code 깔기 (C/C++)</title>
      <link>https://bk-coding.tistory.com/5</link>
      <description>&lt;p&gt;이젠 코딩을 해야하니 Visual Studio Code를 깔아야한다.&lt;/p&gt;
&lt;p&gt;일단 백준 코딩테스트를 위한 C++ 공부를 하려고 깔게된것이니.. 일단 C/C++ 컴파일 환경부터 만든다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;우분투 gcc, g++ 설치&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;build-essential 패키지를 아래 명령문으로 설치하면 gcc, g++이 설치된다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:bash &quot;&gt;$ sudo apt-get install build-essential&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;span style=&quot;font-size: 24px;&quot;&gt;&lt;b&gt;Visual Studio Code 설치&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;그냥 공식 홈페이지에서 가서 받으면 된다. 리눅스 지원해준다.. (카톡과는 다르게)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://code.visualstudio.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;https://code.visualstudio.com/&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;언어를 한국어로 변경&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;언어를 한국어로 변환하는 건 쉽다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 47px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/9973824F5C88F4712A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F9973824F5C88F4712A&quot; width=&quot;47&quot; height=&quot;240&quot; filename=&quot;스크린샷, 2019-03-13 20-39-45.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;일단 제일 아래에 있는 확장프로그램 아이콘을 누른다. (Ctrl + Shift + X 를 눌러도 된다.)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;검색창에 'korean' 이라고 치면 'Korean Language Pack for Visual ... 샬라샬라' 가 나온다.&lt;/p&gt;
&lt;p&gt;제일 위에있는거.. 그거 그냥 설치하면 된다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;설치 후 재시작하면 한글로 바뀌어 있다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;b style=&quot;font-size: 24px;&quot;&gt;C/C++ 언어 지원 설치&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;C/C++에 대한 문법 강조는 기본적으로 지원하고 있으나, 해당 프로그램에서 제대로 사용하려면 확장을 설치해줘야한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;방금 검색한 그곳에서 'c/c++' 을 입력하면 'C/C++' 이라는 제일 상위에 있는 프로그램이 나온다. 그거 설치..&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;b style=&quot;font-size: 24px;&quot;&gt;C/C++ 프로젝트 생성&lt;/b&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;위 사진의 액티비티바에서 제일 위에 있는 탐색기를 연다.&lt;/p&gt;
&lt;p&gt;폴더 열기 버튼을 클릭 후 프로젝트를 저장할 폴더를 선택한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 431px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/994D30485C88F64F1A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F994D30485C88F64F1A&quot; width=&quot;431&quot; height=&quot;228&quot; filename=&quot;스크린샷, 2019-03-13 21-22-53.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;이후에 위 사진에 표시된 아이콘을 눌러&amp;nbsp;임의로 하위 폴더를 하나 만들고, 바로 옆에있는 아이콘을 사용해 'hello.cpp' 파일을 만든다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;cpp 파일 안에는 이렇게 코드를 작성한다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;/p&gt;&lt;pre class=&quot;brush:cpp &quot;&gt;&lt;p&gt;#include &amp;lt;iostream&amp;gt;
using namespace std;

int main() {
cout &amp;lt;&amp;lt; &quot;Hello, World!&quot; &amp;lt;&amp;lt; endl;

return 0;
}&lt;/p&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;
&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 24px;&quot;&gt;&lt;b&gt;코드 컴파일 및 실행&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;아까 만들었던 파일들을 컴파일 하기 위한 과정이다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol style=&quot;list-style-type: decimal;&quot;&gt;&lt;li&gt;&amp;nbsp;일단 Visual Studio Code 의 메뉴에서 [터미널 &amp;gt; 기본 빌드 작업 구성] 을 선택한다.&lt;/li&gt;&lt;li&gt;&amp;nbsp;검색창 밑쪽에 뜨는 '템플릿에서 tasks.json 파일 만들기' 를 선택한다.&lt;/li&gt;&lt;li&gt;&amp;nbsp;'Other 임의의 외부 명령을 실행하는 예' 를 선택한다.&lt;/li&gt;&lt;li&gt;&amp;nbsp;탐색기에 'tasks.json' 파일이 추가되고 편집기에서 해당 파일이 열린다.&lt;/li&gt;&lt;li&gt;&amp;nbsp;'tasks.json' 내용을 하단의 소스코드로 교체 후 저장한다.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;pre class=&quot;brush:text&quot;&gt;{
    &quot;version&quot;: &quot;2.0.0&quot;,
    &quot;runner&quot;: &quot;terminal&quot;,
    &quot;type&quot;: &quot;shell&quot;,
    &quot;echoCommand&quot;: true,
    &quot;presentation&quot; : { &quot;reveal&quot;: &quot;always&quot; },
    &quot;tasks&quot;: [
          //C++ 컴파일
          {
            &quot;label&quot;: &quot;save and compile for C++&quot;,
            &quot;command&quot;: &quot;g++&quot;,
            &quot;args&quot;: [
                &quot;${file}&quot;,
                &quot;-g&quot;,
                &quot;-o&quot;,
                &quot;${fileDirname}/${fileBasenameNoExtension}&quot;
            ],
            &quot;group&quot;: &quot;build&quot;,

            //컴파일시 에러를 편집기에 반영
            //참고:   https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher

            &quot;problemMatcher&quot;: {
                &quot;fileLocation&quot;: [
                    &quot;relative&quot;,
                    &quot;${workspaceRoot}&quot;
                ],
                &quot;pattern&quot;: {
                    // The regular expression. 
                   //Example to match: helloWorld.c:5:3: warning: implicit declaration of function 'prinft'
                    &quot;regexp&quot;: &quot;^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$&quot;,
                    &quot;file&quot;: 1,
                    &quot;line&quot;: 2,
                    &quot;column&quot;: 3,
                    &quot;severity&quot;: 4,
                    &quot;message&quot;: 5
                }
            }
        },
        //C 컴파일
        {
            &quot;label&quot;: &quot;save and compile for C&quot;,
            &quot;command&quot;: &quot;gcc&quot;,
            &quot;args&quot;: [
                &quot;${file}&quot;,
                &quot;-g&quot;,
                &quot;-o&quot;,
                &quot;${fileDirname}/${fileBasenameNoExtension}&quot;
            ],
            &quot;group&quot;: &quot;build&quot;,

            //컴파일시 에러를 편집기에 반영
            //참고:   https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher

            &quot;problemMatcher&quot;: {
                &quot;fileLocation&quot;: [
                    &quot;relative&quot;,
                    &quot;${workspaceRoot}&quot;
                ],
                &quot;pattern&quot;: {
                    // The regular expression. 
                   //Example to match: helloWorld.c:5:3: warning: implicit declaration of function 'prinft'
                    &quot;regexp&quot;: &quot;^(.*):(\\d+):(\\d+):\\s+(warning error):\\s+(.*)$&quot;,
                    &quot;file&quot;: 1,
                    &quot;line&quot;: 2,
                    &quot;column&quot;: 3,
                    &quot;severity&quot;: 4,
                    &quot;message&quot;: 5
                }
            }
        },
        // 바이너리 실행(Ubuntu)

        {

            &quot;label&quot;: &quot;execute&quot;,

            &quot;command&quot;: &quot;cd ${fileDirname} &amp;amp;&amp;amp; ./${fileBasenameNoExtension}&quot;,

            &quot;group&quot;: &quot;test&quot;

        }
        // // 바이너리 실행(Windows)
        // {
        //     &quot;label&quot;: &quot;execute&quot;,
        //     &quot;command&quot;: &quot;cmd&quot;,
        //     &quot;group&quot;: &quot;test&quot;,
        //     &quot;args&quot;: [
        //         &quot;/C&quot;, &quot;${fileDirname}\\${fileBasenameNoExtension}&quot;
        //     ]
    
        // }
    ]
}
&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>OS/Ubuntu</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/5</guid>
      <comments>https://bk-coding.tistory.com/5#entry5comment</comments>
      <pubDate>Wed, 13 Mar 2019 20:41:03 +0900</pubDate>
    </item>
    <item>
      <title>우분투 18.04에 [카카오톡] 설치</title>
      <link>https://bk-coding.tistory.com/1</link>
      <description>&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;이번에 리눅스를 좀 해보겠다고 깔았는데 카카오톡 설치부터 엄청나게 힘들었다. 다른곳에서 본 내용들은 설치는 되지만 카카오톡을 실행하고 로그인하면 꺼지거나 오류뿜으며 종료됐다. 그나마 이방법이 실행은 되고 한번 카톡채팅도 보내지는걸로 확인이 된다..&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;솔직히 다 똑같은것같은데 왜 그런지 잘 모르겠다.. &lt;strike&gt;지금도 카카오톡이 방금까지 잘 됐다가 채팅방에 들어가면 '대화내용을 불러오는 중입니다.' 라고 뜨며 사실 제대로 되지도 않는다.&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;strike&gt;이 글을 다 쓰고나서 재부팅 했는데도 이 난리면 그냥 VMWare 사용해서 리눅스를 쓸까 한다.&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;strike&gt;
&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;strike&gt;(아예 윈도우 체계가 달라져야 뭔가 공부할것 같아서 다른 SSD에 우분투를 깔고 코딩전용으로 쓰려고 했는데 너무 열뻗친다.. 카톡만 있으면 되는데..)&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;strike&gt;&lt;br /&gt;&lt;/strike&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b style=&quot;font-size: 12pt;&quot;&gt;&lt;span style=&quot;color: rgb(152, 0, 0);&quot;&gt;껐다 키니 정말 잘된다! 아마 성공한듯 싶다. 가끔 불안정해 꺼지긴 하지만 그게 어디야!&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;일단 현재 우분투 버전은 18.04버전이다.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;/div&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;b style=&quot;font-size: 24px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; color: rgb(0, 0, 0);&quot;&gt;Wine 설치&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;카카오 홈페이지에는 리눅스 버전이 없다. 리눅스에서 카카오톡을 실행하려면 'wine'이라는 프로그램을 사용하여 설치해야한다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-size: 10pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;'wine'은 리눅스 환경에서 윈도우 프로그램들을 사용할수 있게 도와준다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-size: 10pt; text-align: left; line-height: 0.8;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;font-size: 10pt; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;아래 명령어를 터미널에 입력해서 wine을 설치한다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;font-size: 10pt; text-align: left;&quot;&gt;&lt;/p&gt;&lt;pre class=&quot;brush:bash &quot;&gt; $ sudo apt-get install wine-stable cabextract
&lt;/pre&gt;&lt;p&gt;'wine'을 설치한 후, 기본환경을 초기화 하기 위해 터미널에 아래 명령어를 입력한다.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:bash &quot;&gt;$ WINEARCH=win32 WINEPREFIX=~/.wine wine wineboot
&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Wine&amp;nbsp; 설정&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;'wine'에서 프로그램을 설치하기 위해선 윈도우 기본 라이브러리를 설치해야한다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;pre class=&quot;brush:bash &quot;&gt;$ wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
$ chmod +x winetricks
$ ./winetricks --optout
&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;실행 후에 나오는 창에서 아래 표기된 순서대로 진행한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ol style=&quot;list-style-type: decimal;&quot;&gt;&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;[Select the default wineprefix]&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt; 선택&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;[Install a Windows DLL or component]&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt; 선택&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;다음 창에서 &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;gdiplus, d3dx9_43, msxml6, riched30, wmp9&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt; 를 선택 후 OK 클릭&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;다음으로 한글 폰트를 설정해줘야한다. 설정해주지 않으면 한글이 깨져서 네모네모가 된다.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;아래 파일을 다운받아서 압축을 해제하고, '/home/.wine/drive_c/windows/Fonts'에 복사한다.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block;   height: auto; max-width: 100%;&quot;&gt;&lt;a href=&quot;https://t1.daumcdn.net/cfile/tistory/99C36B4B5C88C9180B&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/zip.gif&quot; style=&quot;vertical-align: middle;&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;gulim.ttf.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;그 후에 '/home/.wine/system.reg' 파일을 열어서..&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class=&quot;brush:text&quot;&gt;* 수정전
&quot;MS Shell Dlg&quot;=&quot;Tahoma&quot;
&quot;MS Shell Dlg 2&quot;=&quot;Tahoma&quot; &lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;Tahoma 라고 되어있는곳을 Gulim으로 수정 해 준다.&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;brush:text&quot;&gt; * 수정후
&quot;MS Shell Dlg&quot;=&quot;Gulim&quot;
&quot;MS Shell Dlg 2&quot;=&quot;Gulim&quot;
&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;&lt;blockquote class=&quot;tx-quote-tistory&quot;&gt;&lt;div&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;카카오톡 설치&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;카카오톡을 다운받아줘야 하는데, 그전에 터미널에서 확인해줘야할게 있다.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size:10pt;&quot;&gt;&lt;pre class=&quot;brush:bash &quot;&gt;$ winecfg
&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;해당 명령어를 입력해서 현재 깔려있는 'wine'의 윈도우 운영체제 호환을 확인하고, windowsXP가 아니라면 XP로 변경해준다.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;다음으로 카카오톡 홈페이지에 들어가서 다운로드에 있는 WindowsXP 버전을 설치해준다.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;a href=&quot;https://www.kakaocorp.com/service/KakaoTalk&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif; font-size: 10pt;&quot;&gt;https://www.kakaocorp.com/service/KakaoTalk&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;다운받은 카카오톡 파일을 'wine'으로 실행시켜주면 된다.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;pre class=&quot;brush:bash &quot;&gt; $ wine-stable KakaoTalk_Setup.exe
&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;설치 한 후 실행하면 끝이지만.. 설치후에 [자동으로 카카오톡 시작] 은 체크하지 않고 설치를 마치고 재부팅을 하길 권장한다.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 13.3333px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;일단 다 깔긴했지만.. 뭔가 계속 왔다갔다한다. 어떨땐 되고, 어떨땐 안되고..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;일단 크게 두가지 오류가 생긴다.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ol style=&quot;list-style-type: decimal;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;로그인을 하면 갑자기 꺼지는 현상&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;잠금 비밀번호까지 쳐서 채팅창까지 접속이 됐는데, 채팅창을 열면 '대화내용을 불러오는 중입니다.' 에서 진행이 안되는 현상&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;사용해가면서 알아봐나가야 할 것 같다..&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;이거때문에 어제 오늘 하루종일 시달렸다.. ㅠㅠ&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 18pt;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;</description>
      <category>OS/Ubuntu</category>
      <author>mintheon</author>
      <guid isPermaLink="true">https://bk-coding.tistory.com/1</guid>
      <comments>https://bk-coding.tistory.com/1#entry1comment</comments>
      <pubDate>Wed, 13 Mar 2019 16:00:16 +0900</pubDate>
    </item>
  </channel>
</rss>