{"id":8196,"date":"2008-10-12T11:50:00","date_gmt":"2008-10-12T11:50:00","guid":{"rendered":"http:\/\/melotopia.net\/b\/?p=8196"},"modified":"2008-10-12T11:50:00","modified_gmt":"2008-10-12T11:50:00","slug":"3n1-%eb%ac%b8%ec%a0%9c","status":"publish","type":"post","link":"http:\/\/melotopia.net\/b\/?p=8196","title":{"rendered":"3n+1 \ubb38\uc81c"},"content":{"rendered":"<div class=\"desc\">\n        \uac00\uc124: \uc5b4\ub5a4 \uc784\uc758\uc758 \uc790\uc5f0\uc218\ub97c \uc0dd\uac01\ud558\uc790. \uadf8 \uc790\uc5f0\uc218\uac00 \uc9dd\uc218\uba74 2\ub85c \ub098\ub204\uace0 \ud640\uc218\uba74 3\ubc30\ud558\uc5ec 1\uc744 \ub354\ud55c\ub2e4. \uadf8 \uacb0\uacfc\ub85c \uc5bb\uc5b4\uc9c4 \uc790\uc5f0\uc218\uc5d0 \uac19\uc740 \uc870\uc791\uc744 \ubc18\ubcf5\ud55c\ub2e4. \uadf8\ub7fc \uc5b8\uc820\uac00 \ubc18\ub4dc\uc2dc 1\uc774 \ub41c\ub2e4.<\/p>\n<p>        \uadf8 \ubb38\uc81c\uc5d0 \ub3c4\uc804\ud558\ub294 C\ud504\ub85c\uadf8\ub7a8\uc774\ub2e4.<\/p>\n<p>        #include<stdio.h><br \/>\n        <br \/>\n        #include<stdlib.h><\/p>\n<p>        long long evenodd(long long);<br \/>\n        <br \/>\n        long long length(long long);<br \/>\n        <br \/>\n        int main(){<br \/>\n        <br \/>\n        long long i,leng,t,keep;<br \/>\n        <br \/>\n        leng=1ll;<br \/>\n        <br \/>\n        keep=1;<br \/>\n        <br \/>\n        i=1000000ll;<br \/>\n        <br \/>\n        while(i){<br \/>\n        <br \/>\n        t=length(i);<br \/>\n        <br \/>\n        if(leng<=t){\n        <br \/>\n        leng=t;<br \/>\n        <br \/>\n        keep=i;<br \/>\n        <br \/>\n        }<br \/>\n        <br \/>\n        i&#8211;;<br \/>\n        <br \/>\n        }<br \/>\n        <br \/>\n        printf(&#8220;%lld has length of %lld\\n&#8221;,keep,leng);<br \/>\n        <br \/>\n        }<br \/>\n        <br \/>\n        long long evenodd(long long n){<br \/>\n        <br \/>\n        if(n%2ll==0ll){<br \/>\n        <br \/>\n        return n\/2ll;<br \/>\n        <br \/>\n        }<br \/>\n        <br \/>\n        else{<br \/>\n        <br \/>\n        return n*3ll+1ll;<br \/>\n        <br \/>\n        }<br \/>\n        <br \/>\n        }<br \/>\n        <br \/>\n        long long length(long long l){<br \/>\n        <br \/>\n        long long leng=1;<br \/>\n        <br \/>\n        long long i=l;<br \/>\n        <br \/>\n        while(i-1){<br \/>\n        <br \/>\n        i=evenodd(i);<br \/>\n        <br \/>\n        leng++;<br \/>\n        <br \/>\n        }<br \/>\n        <br \/>\n        printf(&#8220;%lld, %lld\\n&#8221;,leng,l);<br \/>\n        <br \/>\n        return leng;<br \/>\n        <br \/>\n        }<br \/>\n        <\/p>\n<div style=\"width:100%;margin-top:30px;clear:both;height:30px\">\n<div style=\"width:31px;float:left;\">\n<a href=\"\/toolbar\/popup\/abuseReport\/?entryId=999\" onclick=\"window.open(this.href, 'tistoryThisBlogPopup', 'width=550, height=510, toolbar=no, menubar=no, status=no, scrollbars=no'); return false;\"><br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" alt=\"\uc2e0\uace0\" src=\"https:\/\/i0.wp.com\/t1.daumcdn.net\/tistory_admin\/static\/ico\/ico_spam_report.png\" style=\"border:0\"\/><br \/>\n<\/a>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\uac00\uc124: \uc5b4\ub5a4 \uc784\uc758\uc758 \uc790\uc5f0\uc218\ub97c \uc0dd\uac01\ud558\uc790. \uadf8 \uc790\uc5f0\uc218\uac00 \uc9dd\uc218\uba74 2\ub85c \ub098\ub204\uace0 \ud640\uc218\uba74 3\ubc30\ud558\uc5ec 1\uc744 \ub354\ud55c\ub2e4. \uadf8 \uacb0\uacfc\ub85c \uc5bb\uc5b4\uc9c4 \uc790\uc5f0\uc218\uc5d0 \uac19\uc740 \uc870\uc791\uc744 \ubc18\ubcf5\ud55c\ub2e4. \uadf8\ub7fc \uc5b8\uc820\uac00 \ubc18\ub4dc\uc2dc 1\uc774 \ub41c\ub2e4. \uadf8 \ubb38\uc81c\uc5d0 \ub3c4\uc804\ud558\ub294 C\ud504\ub85c\uadf8\ub7a8\uc774\ub2e4. #include #include long long evenodd(long long); long long length(long long); int main(){ long long i,leng,t,keep; leng=1ll; keep=1; i=1000000ll; while(i){ t=length(i); if(leng<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-8196","post","type-post","status-publish","format-standard","hentry","category-12"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8o6gA-28c","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/8196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8196"}],"version-history":[{"count":0,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/8196\/revisions"}],"wp:attachment":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8196"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}