{"id":257,"date":"2023-08-02T13:33:53","date_gmt":"2023-08-02T05:33:53","guid":{"rendered":"https:\/\/solost.cn\/?p=257"},"modified":"2023-08-02T13:33:53","modified_gmt":"2023-08-02T05:33:53","slug":"386","status":"publish","type":"post","link":"https:\/\/solost.cn\/?p=257","title":{"rendered":"\u8bd5\u9664\u6cd5\u6c42\u7ea6\u6570"},"content":{"rendered":"<pre><code class=\"lang-cpp\">#include &lt;iostream&gt;\n#include &lt;algorithm&gt;\n#include &lt;vector&gt;\n\nusing namespace std;\n\nvector&lt;int&gt; get_divisors(int x)\n{\n    vector&lt;int&gt; res;\n    for (int i = 1; i &lt;= x \/ i; i ++ )\n        if (x % i == 0)\n        {\n            res.push_back(i);\n            if (i != x \/ i) res.push_back(x \/ i);\n        }\n    sort(res.begin(), res.end());\n    return res;\n}\n\nint main()\n{\n    int n;\n    cin &gt;&gt; n;\n\n    while (n -- )\n    {\n        int x;\n        cin &gt;&gt; x;\n        auto res = get_divisors(x);\n\n        for (auto x : res) cout &lt;&lt; x &lt;&lt; &#039; &#039;;\n        cout &lt;&lt; endl;\n    }\n\n    return 0;\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>#include &lt;iostream&gt; #include &lt;algorithm&gt; #include &lt;vector&gt; using namespace std; vector&lt;int&gt; get_divisors(int x) { vector&lt;int&gt; res; for (int i = 1; i &lt;= x \/ i; i ++ ) if (x % i == 0) { res.push_back(i); if (i != x \/ i) res.push_back(x \/ i); } sort(res.begin(), res.end()); return res; } int main() { int [&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":[59],"class_list":["post-257","post","type-post","status-publish","format-standard","hentry","category-acm","tag-59"],"_links":{"self":[{"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/257","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=257"}],"version-history":[{"count":0,"href":"https:\/\/solost.cn\/index.php?rest_route=\/wp\/v2\/posts\/257\/revisions"}],"wp:attachment":[{"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solost.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}