{"id":65054,"date":"2025-05-03T13:06:43","date_gmt":"2025-05-03T05:06:43","guid":{"rendered":"https:\/\/fwq.ai\/blog\/65054\/"},"modified":"2025-05-03T13:06:43","modified_gmt":"2025-05-03T05:06:43","slug":"java-%e6%b0%b4%e4%bb%99%e6%95%b0%e4%bb%a3%e7%a0%81%e6%8e%a7%e5%88%b6%e5%8f%b0%e6%97%a0%e5%8f%8d%e5%ba%94%ef%bc%8c%e9%97%ae%e9%a2%98%e5%87%ba%e5%9c%a8%e5%93%aa%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/65054\/","title":{"rendered":"Java \u6c34\u4ed9\u6570\u4ee3\u7801\u63a7\u5236\u53f0\u65e0\u53cd\u5e94\uff0c\u95ee\u9898\u51fa\u5728\u54ea\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173106993517917.jpg\" class=\"aligncenter\" title=\"Java \u6c34\u4ed9\u6570\u4ee3\u7801\u63a7\u5236\u53f0\u65e0\u53cd\u5e94\uff0c\u95ee\u9898\u51fa\u5728\u54ea\uff1f\u63d2\u56fe\" alt=\"Java \u6c34\u4ed9\u6570\u4ee3\u7801\u63a7\u5236\u53f0\u65e0\u53cd\u5e94\uff0c\u95ee\u9898\u51fa\u5728\u54ea\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u6c34\u4ed9\u6570\u4ee3\u7801\u95ee\u9898\u5206\u6790<\/strong><\/p>\n<p>\u5982\u9898\u6240\u793a\uff0c\u6c42\u6c34\u4ed9\u6570\u7684 java \u4ee3\u7801\u51fa\u73b0\u4e86\u63a7\u5236\u53f0\u65e0\u53cd\u5e94\u7684\u95ee\u9898\u3002\u4e0b\u9762\u5206\u6790\u4ee3\u7801\u4e2d\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\uff1a<\/p>\n<p>\u4e3b\u65b9\u6cd5\u7684 shuru() \u65b9\u6cd5\u963b\u585e\u4e86\u4ee3\u7801\u6267\u884c\u3002\u5728 is() \u65b9\u6cd5\u4e2d\uff0c\u5c06 shuru() \u4f5c\u4e3a\u5224\u65ad\u6761\u4ef6\uff0c\u5bfc\u81f4\u4ee3\u7801\u5728\u5224\u65ad\u8fc7\u7a0b\u4e2d\u518d\u6b21\u963b\u585e\uff0c\u7b49\u5f85\u63a7\u5236\u53f0\u8f93\u5165\u3002<\/p>\n<p>\u6b63\u786e\u7684\u5199\u6cd5\u662f\uff1a<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<pre>public static boolean is(int a, int b, int c, int num) {\n    return (a * a * a) + (b * b * b) + (c * c * c) == num;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728 is() \u65b9\u6cd5\u4e2d\u76f4\u63a5\u5224\u65ad\u4e09\u4e2a\u6570\u5b57\u7684\u7acb\u65b9\u548c\u662f\u5426\u7b49\u4e8e\u539f\u6570\uff0c\u800c\u65e0\u9700\u518d\u6b21\u8c03\u7528 shuru() \u65b9\u6cd5\u3002<\/p>\n<p>\u4fee\u6539\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>public class c1t3 {\n    public static Integer shuru() {\n        Scanner reader = new Scanner(System.in);\n        System.out.println(\"123\");\n        int date = reader.nextInt();\n        return date;\n    }\n\n    public static void main(String[] args) {\n        System.out.println(\"\u8bf7\u8f93\u5165\u4e00\u4e2a\u4e09\u4f4d\u6570\u7684\u6574\u6570\");\n        String a = shuru().toString();\n        String[] b = a.split(\"\");\n        int[] math = new int[b.length];\n\n        for (int i = 0; i &lt; b.length; i++) {\n            math[i] = Integer.parseInt(b[i]);\n        }\n        if (is(math[0], math[1], math[2], Integer.parseInt(a))) {\n            System.out.println(\"\u8fd9\u4e2a\u6570\u662f\u6c34\u4ed9\u6570\");\n        } else {\n            System.out.println(\"\u8fd9\u4e2a\u4e0d\u662f\u6c34\u4ed9\u6570\");\n        }\n    }\n\n    public static boolean is(int a, int b, int c, int num) {\n        return (a * a * a) + (b * b * b) + (c * c * c) == num;\n    }\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fJava \u6c34\u4ed9\u6570\u4ee3\u7801\u63a7\u5236\u53f0\u65e0\u53cd\u5e94\uff0c\u95ee\u9898\u51fa\u5728\u54ea\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8IDCBABY\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6c34\u4ed9\u6570\u4ee3\u7801\u95ee\u9898\u5206\u6790 \u5982\u9898\u6240\u793a\uff0c\u6c42\u6c34\u4ed9\u6570\u7684 java \u4ee3\u7801\u51fa\u73b0\u4e86\u63a7\u5236\u53f0\u65e0\u53cd\u5e94\u7684\u95ee\u9898\u3002\u4e0b\u9762\u5206\u6790\u4ee3\u7801\u4e2d\u53ef\u80fd\u51fa\u73b0\u7684\u95ee\u9898\uff1a \u4e3b\u65b9\u6cd5\u7684 shuru() \u65b9\u6cd5\u963b\u585e\u4e86\u4ee3\u7801\u6267\u884c\u3002\u5728 is() \u65b9\u6cd5\u4e2d\uff0c\u5c06 shuru() \u4f5c\u4e3a\u5224\u65ad\u6761\u4ef6\uff0c\u5bfc\u81f4\u4ee3\u7801\u5728\u5224\u65ad\u8fc7\u7a0b\u4e2d\u518d\u6b21\u963b\u585e\uff0c\u7b49\u5f85\u63a7\u5236\u53f0\u8f93\u5165\u3002 \u6b63\u786e\u7684\u5199\u6cd5\u662f\uff1a \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b public static boolean is(int a, int b, int c, int num) { return (a * a * a) + (b * b * b) + (c * c * c) == num; } \u767b\u5f55\u540e\u590d\u5236 \u5728 is() \u65b9\u6cd5\u4e2d\u76f4\u63a5\u5224\u65ad\u4e09\u4e2a\u6570\u5b57\u7684\u7acb\u65b9\u548c\u662f\u5426\u7b49\u4e8e\u539f\u6570\uff0c\u800c\u65e0\u9700\u518d\u6b21\u8c03\u7528 shuru() \u65b9\u6cd5\u3002 \u4fee\u6539\u540e\u7684\u4ee3\u7801\u5982\u4e0b\uff1a public class [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-65054","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/65054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=65054"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/65054\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=65054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=65054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=65054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}