{"id":120,"date":"2022-02-26T22:02:02","date_gmt":"2022-02-26T14:02:02","guid":{"rendered":"https:\/\/blog.lickoo.fun\/?p=120"},"modified":"2022-03-20T16:27:50","modified_gmt":"2022-03-20T08:27:50","slug":"%e6%9c%80%e5%a4%a7%e5%85%ac%e5%9b%a0%e6%95%b0_%e6%9c%80%e5%b0%8f%e5%85%ac%e5%80%8d%e6%95%b0_beta1","status":"publish","type":"post","link":"https:\/\/blog.lickoo.fun\/?p=120","title":{"rendered":"\u6700\u5927\u516c\u56e0\u6570_\u6700\u5c0f\u516c\u500d\u6570_beta1"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code lang=\"cpp\" class=\"language-cpp\">typedef unsigned int uint;\r\nusing namespace std;\r\n\r\nvoid Cf(uint n1,uint n2);   \/\/\u8f97\u8f6c\u76f8\u9664\u6cd5\u6c42\u6700\u5927\u516c\u56e0\u6570\r\nvoid Cm(uint n1,uint n2);   \/\/\u66b4\u529b\u679a\u4e3e\u6c42\u6700\u5c0f\u516c\u500d\u6570\r\n\r\nint main()\r\n{\r\n    unsigned int Num1,Num2;\r\n    cin &amp;gt;&amp;gt; Num1 &amp;gt;&amp;gt; Num2;\r\n    Cf(Num1,Num2);\r\n    Cm(Num1,Num2);\r\n    system(\"pause\");\r\n    return 0;\r\n}\r\n\r\nvoid Cf(uint n1,uint n2)\r\n{\r\n    uint Temp;\r\n    if(n1 == n2)\r\n    {\r\n        cout &amp;lt;&amp;lt; n1 &amp;lt;&amp;lt; endl;\r\n        return;\r\n    }\r\n    else if(n1 &amp;lt; n2)\r\n    {\r\n        Temp = n1;\r\n        n1 = n2;\r\n        n2 = Temp;\r\n    }\r\n    do\r\n    {\r\n      Temp = n1 % n2;\r\n      n1 = n2;\r\n      n2 = Temp;\r\n    }while(Temp != 0);\r\n    cout &amp;lt;&amp;lt; n1 &amp;lt;&amp;lt;endl;\r\n}\r\n\r\nvoid Cm(uint n1,uint n2)\r\n{\r\n    uint Temp;\r\n    if(n1 == n2)\r\n    {\r\n        cout &amp;lt;&amp;lt; n1 * n2 &amp;lt;&amp;lt; endl;\r\n        return;\r\n    }\r\n    else if(n1 &amp;lt; n2)\r\n    {\r\n        Temp = n1;\r\n        n1 = n2;\r\n        n2 = Temp;\r\n    }\r\n    if (n1 % n2 == 0)\r\n    {\r\n        cout &amp;lt;&amp;lt; n1 &amp;lt;&amp;lt; endl;\r\n        return;\r\n    }\r\n    else\r\n    {\r\n        for(Temp = n1 * n2;Temp % n1 != 0 || Temp % n2 != 0;Temp--);\r\n        cout &amp;lt;&amp;lt; Temp &amp;lt;&amp;lt; endl;\r\n    }\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=\/wp\/v2\/posts\/120"}],"collection":[{"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=120"}],"version-history":[{"count":2,"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":229,"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=\/wp\/v2\/posts\/120\/revisions\/229"}],"wp:attachment":[{"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lickoo.fun\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}