<div><b>언어: C/C++ </b></div> <div> <div>댓글로 소스코드나 링크(pastebin 같은...)를 올려주세요.</div> <div>최소, 최적의 소스코드로 성공하신분에게는 쓸데가 없어 창고에서 구르고 있는^^ <span style="font-size: 9pt; line-height: 1.5"><u>120mm 투명 LED(청색) 팬</u>을 드립니다. </span></div> <div><span style="font-size: 9pt; line-height: 1.5">(택배요금 선불 기한은 24시간)</span></div></div> <div><span style="font-size: 9pt; line-height: 1.5"><br /></span></div> <div> <div class="pname" style="font-weight: bolder; font-size: 13pt; font-family: 'Times New Roman'; line-height: normal">문제: octal(open)</div> <div class="tlimit" style="font-size: 9pt; text-decoration: underline; text-align: right; font-family: 'Times New Roman'; line-height: normal">제한시간: 1 초</div> <p style="font-family: 'Times New Roman'; font-size: 15px; line-height: normal">슬바브코는 다른 진법에 대해서 배우고 있다. 그런데 그는 이쪽 관련해서는 머리가 빠르게 돌아가지 않는다. 그래서 다음과 같은 알고리즘을 사용해서 이진법을 8 진법으로 변환하는 프로그램을 작성 하려고 한다.</p> <div style="font-family: 'Times New Roman'; font-size: 15px; line-height: normal; background-color: #abcdef; width: 500px; margin: 10px">2 진수 -> 8 진수 변환 알고리즘 <ol style="line-height: 1.5"> <li>2 진수 자릿수가 3 의 배수가 되도록 왼쪽에 0 을 채운다.</li> <li>수를 3 개씩 묶어서</li> <li>다음에 주어지는 테이블을 이용해서 2 진수로 변환 <table bgcolor="#000000" border="0" cellspacing="1" width="250"> <tbody> <tr bgcolor="#ffffff" align="center"> <td>000</td> <td>0</td></tr> <tr bgcolor="#ffffff" align="center"> <td>001</td> <td>1</td></tr> <tr bgcolor="#ffffff" align="center"> <td>010</td> <td>2</td></tr> <tr bgcolor="#ffffff" align="center"> <td>011</td> <td>3</td></tr> <tr bgcolor="#ffffff" align="center"> <td>100</td> <td>4</td></tr> <tr bgcolor="#ffffff" align="center"> <td>101</td> <td>5</td></tr> <tr bgcolor="#ffffff" align="center"> <td>110</td> <td>6</td></tr> <tr bgcolor="#ffffff" align="center"> <td>111</td> <td>7</td></tr></tbody></table></li></ol></div> <h4 style="font-family: 'Times New Roman'; font-size: 15px; line-height: normal">입력</h4><span style="font-family: 'Times New Roman'; font-size: 15px; line-height: normal">100,000 자리를 넘지 않고 첫 수는 1 로 시작한다.</span> <h4 style="font-family: 'Times New Roman'; font-size: 15px; line-height: normal">출력</h4><span style="font-family: 'Times New Roman'; font-size: 15px; line-height: normal">대응되는 8 진수를 출력한다.</span> <h4 style="font-family: 'Times New Roman'; font-size: 15px; line-height: normal">입출력 예</h4><pre class="io" style="font-size: 10pt; line-height: normal">입력</pre><pre class="io" style="font-size: 10pt; line-height: normal">1010</pre><pre class="io" style="font-size: 10pt; line-height: normal">출력</pre><pre class="io" style="font-size: 10pt; line-height: normal">12</pre><pre class="io" style="font-size: 10pt; line-height: normal"><br /></pre><pre class="io" style="font-size: 10pt; line-height: normal">입력</pre><pre class="io" style="font-size: 10pt; line-height: normal">11001100</pre><pre class="io" style="font-size: 10pt; line-height: normal">출력</pre><pre class="io" style="font-size: 10pt; line-height: normal">314</pre><pre class="io" style="font-size: 10pt; line-height: normal"><br /></pre> <div>입력<br /><font size="3"><span style="line-height: normal">111010110010101010011001101001001011011010100110001000000000010100010100010010001101011010110011101001010011001010010010000101010011011100101101100000101110011111000001010010110101001011001111100100000111011011101000010000110000100100000110110100101100111110110101000100010100010100100101010010001000011000100110111010111011001000011101101111111100110010111100111010110110000101100000001010100101001101010100011001111011011000101011100101100010010101010010111100111100000110001100100000101110010101100111000111101000100010101011111000100011010100101110000110000111101101011010011100011001101010011100100000110001110100001111110100000110101111110010111000101111101000010111111110000011000111011010100000010111010110111111110101001111001100010011001100010001010000110000110100001101101100110110101001010111111000110010101100111001010001010111110111101001010101101100100001101101100011110111001111111000010111011000001011111000011100001000000110100100001000001010100101110111101010111110100111000001101<br /></span></font><br /></div> <div>출력<br /><font size="3"><span style="line-height: normal">726252315113324610002424221532635123122205233455405637012265131744073350206044066454766504242445221030467273103557746274726605401245152431733053454225227474061440562547075042537043245606075532343152344061641764065762705750277603073240272677651714231421206064155466512770625471212767512554415543671770273013703410064410124567527647015</span></font></div><pre class="io" style="font-size: 10pt; line-height: normal"><b><br /></b></pre><pre class="io" style="font-size: 10pt; line-height: normal"><b>처리조건</b></pre><pre class="io" style="font-size: 10pt; line-height: normal">제한시간: 1초내에 결과가 나올것!!</pre><pre class="io" style="font-size: 10pt; line-height: normal"><br /></pre><pre class="io" style="font-size: 10pt; line-height: normal">입력은 텍스트 파일로 출력도 텍스트 파일로 처리합니다. ex) <span style="font-size: 10pt; font-family: 굴림">a.out <in.txt>output</in.txt></span></pre></div>
댓글 분란 또는 분쟁 때문에 전체 댓글이 블라인드 처리되었습니다.