{"id":218,"date":"2024-04-26T20:54:53","date_gmt":"2024-04-26T12:54:53","guid":{"rendered":"https:\/\/seanxd.com\/?p=218"},"modified":"2024-04-26T20:54:55","modified_gmt":"2024-04-26T12:54:55","slug":"zerojudge-d235","status":"publish","type":"post","link":"https:\/\/seanxd.com\/zh\/zerojudge-d235\/","title":{"rendered":"ZeroJudge D235: You can say 11"},"content":{"rendered":"\n\n\n<h4 class=\"wp-block-heading\">\u540c\u984c\uff1aUVa 10929 &#8211; You can say 11<\/h4>\n\n\n\n<p class=\"\">\u4f60\u7684\u4efb\u52d9\u662f\uff0c\u7d66\u4f60\u4e00\u500b\u6b63\u6574\u6578 N\uff0c\u5224\u5b9a\u5b83\u662f\u5426\u662f<strong> 11 \u7684\u500d\u6578<\/strong>\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u7bc4\u4f8b\u6e2c\u8cc7<\/h2>\n\n\n\n<figure class=\"wp-block-table nfd-wb-animate nfd-wb-fade-in-bottom-short\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7bc4\u4f8b\u8f38\u5165<\/th><th>\u7bc4\u4f8b\u8f38\u51fa<\/th><\/tr><\/thead><tbody><tr><td><strong>EOF<\/strong> \u8f38\u5165\uff0c\u6bcf\u5217\u8cc7\u6599\u6709\u4e00\u500b\u6b63\u6574\u6578 N\uff0cN \u6700\u5927\u53ef\u80fd\u5230 1000 \u4f4d\u6578\u3002<br>\u82e5 N = 0 \u4ee3\u8868\u8f38\u5165\u7d50\u675f\u3002<\/td><td>\u5c0d\u6bcf\u500b\u8f38\u5165\u7684\u6578\uff0c<strong>\u8f38\u51fa\u662f\u5426\u70ba 11 \u7684\u500d\u6578<\/strong>\u3002\u8f38\u51fa\u683c\u5f0f\u8acb\u53c3\u8003 Sample Output\u3002<\/td><\/tr><tr><td>112233<br>30800<br>2937<br>323455693<br>5038297<br>112234<br>0<\/td><td>112233 is a multiple of 11.<br>30800 is a multiple of 11.<br>2937 is a multiple of 11.<br>323455693 is a multiple of 11.<br>5038297 is a multiple of 11.<br>112234 is not a multiple of 11.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u89e3\u984c\u601d\u8def<\/h2>\n\n\n\n<p class=\"\">\u672c\u984c\u7684<strong>\u6578\u5b57\u6703\u8d85\u904e Long Long Int \u7684\u7bc4\u570d<\/strong>\uff0c\u6240\u4ee5\u8981<strong>\u4f7f\u7528\u5b57\u4e32\u7684\u65b9\u5f0f\u5c07N\u6536\u9032\u4f86<\/strong>\u3002<\/p>\n\n\n\n<p class=\"\">\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u516c\u5f0f\u4f86\u5224\u65b7 N \u662f\u5426\u70ba11\u7684\u500d\u6578\uff1a<strong>\u5982\u679c\u5947\u6578\u4f4d\u6578\u7684\u6578\u5b57\u548c\u8207\u5076\u6578\u4f4d\u6578\u7684\u6578\u5b57\u548c\u7684\u5dee\u662f11\u7684\u500d\u6578\u7684\u6703N\u5373\u70ba11\u7684\u500d\u6578<\/strong>\u3002\u53ef\u4ee5\u4f7f\u7528 <strong>For\u8ff4\u5708<\/strong> \u5c07\u6bcf\u4e00\u500b\u4f4d\u6578\u7684\u6578\u5b57\u90fd\u505a\u76f8\u52a0\u4e26\u5728<strong> For\u8ff4\u5708 <\/strong>\u7d50\u675f\u5f8c\u9032\u884c\u5224\u65b7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7bc4\u4f8b\u7a0b\u5f0f\u78bc\uff0d<a href=\"https:\/\/zerojudge.tw\/ShowProblem?problemid=d235\" target=\"_blank\" rel=\"noreferrer noopener\">ZeroJudge D235: You can say 11<\/a><\/h3>\n\n\n\n<div class=\"hcb_wrap nfd-wb-animate nfd-wb-reveal-right nfd-delay-50\"><pre class=\"prism line-numbers lang-cpp\" data-lang=\"C++\"><code>#include &lt;iostream&gt;\nusing namespace std;\n\nint main() {\n    string str;\n    while (cin &gt;&gt; str && str != &quot;0&quot;)\n    {\n        int odd = 0, even = 0;\n        for (int i = 0; i&lt;str.length(); i++)\n        {\n            if (i % 2 == 0) even += int(str[i] - &#39;0&#39;);\n            else odd += int(str[i] - &#39;0&#39;);\n        }\n        if ((odd - even) % 11 == 0) cout &lt;&lt; str &lt;&lt; &quot; is a multiple of 11.\\n&quot;;\n        else cout &lt;&lt; str &lt;&lt; &quot; is not a multiple of 11.\\n&quot;;\n    }\n}\n\n\/\/ZeroJudge D235\n\/\/Dr. SeanXD<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u540c\u984c\uff1aUVa 10929 &#8211; You can say 11 \u4f60\u7684\u4efb\u52d9\u662f\uff0c\u7d66\u4f60\u4e00\u500b\u6b63\u6574\u6578 N\uff0c\u5224\u5b9a\u5b83 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","footnotes":""},"categories":[18],"tags":[8,11,13,9],"class_list":["post-218","post","type-post","status-publish","format-standard","hentry","category-uva","tag-8","tag-11","tag-13","tag-9"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/comments?post=218"}],"version-history":[{"count":2,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/posts\/218\/revisions\/220"}],"wp:attachment":[{"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seanxd.com\/zh\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}