{"id":1906,"date":"2024-04-27T06:36:36","date_gmt":"2024-04-26T22:36:36","guid":{"rendered":"https:\/\/wp.minicoda.com\/?p=1906"},"modified":"2025-05-18T10:24:02","modified_gmt":"2025-05-18T02:24:02","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e5%90%8c%e6%a0%b7%e6%98%af9-4-%e4%b8%8d%e5%90%8c%e8%af%ad%e8%a8%80%e7%bb%93%e6%9e%9c%e4%b8%8d%e5%90%8c","status":"publish","type":"post","link":"https:\/\/wp.minicoda.com\/index.php\/%e4%b8%ba%e4%bb%80%e4%b9%88%e5%90%8c%e6%a0%b7%e6%98%af9-4-%e4%b8%8d%e5%90%8c%e8%af%ad%e8%a8%80%e7%bb%93%e6%9e%9c%e4%b8%8d%e5%90%8c\/","title":{"rendered":"\u6c42\u4f59\u6216\u6c42\u6a21\u6709\u8d1f\u6570\u53c2\u4e0e, \u4e0d\u540c\u8bed\u8a00\u7ed3\u679c\u4e0d\u540c?"},"content":{"rendered":"\n<p>  \u4e0d\u6b62\u662f\u9664\u6cd5\uff0c\u6c42\u4f59\u6216\u6c42\u6a21\u4e00\u65e6\u6709\u8d1f\u6570\u53c2\u4e0e\uff0c\u7ed3\u679c\u53ef\u80fd\u90fd\u6709\u5dee\u5f02\u3002\u672c\u8d28\u5728\u4e8e\u4e0d\u540c\u8bed\u8a00\u4f7f\u7528\u4e0d\u540c\u6c42\u4f59\u89c4\u5219\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5411\u96f6\u53d6\u6574<\/strong><br>\u5411 0 \u65b9\u5411\u53d6\u6700\u63a5\u8fd1\u7cbe\u786e\u503c\u7684\u6574\u6570\uff0cC\/ObjC\/C++\/Rust\/C#\/Java\/Go\/Swift\/JS\/VB\/\u4ed3\u9889\/PHP\/Kotlin \u7b49\u8bed\u8a00\u90fd\u91c7\u7528\u8fd9\u79cd\u65b9\u5f0f\u3002\n<ul class=\"wp-block-list\">\n<li>\u6309\u6b64\u89c4\u5219\uff0c\u88ab\u6c42\u6a21\u7684\u6570\u503c\u662f\u8d1f\u6570\uff0c\u6c42\u6a21\u7684\u6570\u503c\u4e5f\u662f\u8d1f\u6570\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u5411\u4e0b\u53d6\u6574<\/strong><br>\u5411\u8d1f\u65e0\u7a77\u65b9\u5411\u53d6\u6700\u63a5\u8fd1\u7cbe\u786e\u503c\u7684\u6574\u6570\uff0cPython\u91c7\u7528\u8fd9\u79cd\u65b9\u5f0f(Python2\/3\u90fd\u9075\u5faa)\u3002<\/li>\n\n\n\n<li><strong>\u5411\u4e0a\u53d6\u6574<\/strong><br>\u5411\u6b63\u65e0\u7a77\u65b9\u5411\u53d6\u6700\u63a5\u8fd1\u7cbe\u786e\u503c\u7684\u6574\u6570\u3002<\/li>\n<\/ul>\n\n\n\n<p>  \u6240\u4ee5\u95ee\u9898\u5c31\u7b80\u5355\u4e86\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C\u8bed\u8a00<br>9 \/ -4 == -2.25, \u54110\u53d6\u6574\u5f97\u5230\u7ed3\u679c-2\uff0c\u63a8\u7b979 % -4 == 9 - (-2 * -4) == 1.<\/li>\n\n\n\n<li>Python<br>9 \/ -4 == -2.25, \u5411\u4e0b\u53d6\u6574\u5f97\u5230\u7ed3\u679c-3\uff0c\u63a8\u7b979 % -4 == 9 - (-3 * -4) ==-3.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6807\u51c6\u6587\u6863\u7684\u89c4\u5b9a<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C\u8bed\u8a00C89\u89c4\u5b9a\uff0c\u5f53\u9664\u6570\u548c\u88ab\u9664\u6570\u6709\u8d1f\u6570\u65f6\uff0c\u5546\u548c\u4f59\u6570\u7684\u7b26\u53f7\u662f\u672a\u5b9a\u4e49\u884c\u4e3a\u3002C99\u5f00\u59cb\uff0c\u6b64\u884c\u4e3a\u88ab\u7ea6\u675f\u4e3a\u56fa\u5b9a\u884c\u4e3a\uff0c\u5373\u5411\u96f6\u53d6\u6574\u3002\n<ul class=\"wp-block-list\">\n<li>C89 6.3.5\u7ae0\u8282\uff1a\"If either operand is negative. whether the result of the \/ operator is the<br>largest integer less than or equal to the algebraic quotient or the smallest integer greater than or equal to the algebraic quotient is implementation-defined.\"<\/li>\n\n\n\n<li>C99 6.5.5\u7ae0\u8282\uff1a\"When integers are divided, the result of the \/ operator is the algebraic quotient with any fractional part discarded.\u201d<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u7279\u6b8a\u7684\u6c42\u6a21<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>VB \u8bed\u8a00\u7528\u6d6e\u70b9\u6570\u6c42\u6a21\uff0c\u4f1a\u5148\u628a\u6d6e\u70b9\u6570\u8f6c\u6362\u6210\u6574\u6570\u518d\u6c42\u6a21\uff1a<br>12.5 Mod 4.6 \u7b49\u4ef7\u4e8e 12 Mod 4, \u5f97\u52303.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u6b62\u662f\u9664\u6cd5\uff0c\u6c42\u4f59\u6216\u6c42\u6a21\u4e00\u65e6\u6709\u8d1f\u6570\u53c2\u4e0e\uff0c\u7ed3\u679c\u53ef\u80fd\u90fd\u6709\u5dee\u5f02\u3002\u672c\u8d28\u5728\u4e8e\u4e0d\u540c\u8bed\u8a00\u4f7f\u7528\u4e0d\u540c\u6c42\u4f59\u89c4\u5219\u3002 \u6240\u4ee5\u95ee\u9898\u5c31\u7b80\u5355\u4e86\uff1a \u6807\u51c6\u6587\u6863\u7684\u89c4\u5b9a \u7279\u6b8a\u7684\u6c42\u6a21<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299],"tags":[],"class_list":["post-1906","post","type-post","status-publish","format-standard","hentry","category-think"],"views":127,"_links":{"self":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/comments?post=1906"}],"version-history":[{"count":13,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1906\/revisions"}],"predecessor-version":[{"id":4065,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1906\/revisions\/4065"}],"wp:attachment":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/media?parent=1906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/categories?post=1906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/tags?post=1906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}