{"id":262,"date":"2023-09-12T11:30:48","date_gmt":"2023-09-12T03:30:48","guid":{"rendered":"https:\/\/solost.cn\/?p=262"},"modified":"2023-09-12T11:30:48","modified_gmt":"2023-09-12T03:30:48","slug":"391","status":"publish","type":"post","link":"https:\/\/solost.cn\/?p=262","title":{"rendered":"AcWing 867. \u5206\u89e3\u8d28\u56e0\u6570"},"content":{"rendered":"<h2>\u9898\u76ee\u94fe\u63a5<\/h2>\n<p><a href=\"https:\/\/www.acwing.com\/problem\/content\/869\/\">\u94fe\u63a5<\/a><\/p>\n<h2>\u4ee3\u7801<\/h2>\n<pre><code class=\"lang-cpp\">#include &lt;iostream&gt;\n#include &lt;algorithm&gt;\n\nusing namespace std;\n\nvoid divide(int x)\n{\n    for (int i = 2; i &lt;= x \/ i; i ++ )\n        if (x % i == 0)\n        {\n            int s = 0;\n            while (x % i == 0) x \/= i, s ++ ;\n            cout &lt;&lt; i &lt;&lt; &#039; &#039; &lt;&lt; s &lt;&lt; endl;\n        }\n    if (x &gt; 1) cout &lt;&lt; x &lt;&lt; &#039; &#039; &lt;&lt; 1 &lt;&lt; endl;\n    cout &lt;&lt; endl;\n}\n\nint main()\n{\n    int n;\n    cin &gt;&gt; n;\n    while (n -- )\n    {\n        int x;\n        cin &gt;&gt; x;\n        divide(x);\n    }\n\n    return 0;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u76ee\u94fe\u63a5 \u94fe\u63a5 \u4ee3\u7801 #include &lt;iostream&gt; #include &lt;algorithm&gt; using namespace std; void divide(int x) { for (int i = 2; i &lt;= x \/ i; i ++ ) if (x % i == 0) { int s = 0; while (x % i == 0) x \/= i, s ++ ; cout &lt;&lt; i &lt;&lt; &#039; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[72],"tags":[11],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-acm","tag-11"],"_links":{"self":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":0,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"wp:attachment":[{"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}