{"id":40326,"date":"2023-10-04T10:04:07","date_gmt":"2023-10-04T02:04:07","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=40326"},"modified":"2023-10-04T10:04:07","modified_gmt":"2023-10-04T02:04:07","slug":"dzjz","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/40326.html","title":{"rendered":"D509\u8f6c10\u8fdb\u5236"},"content":{"rendered":"
D509\u8f6c10\u8fdb\u5236\u662f\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u5e38\u7528\u7684\u4e00\u79cd\u8fdb\u5236\u8f6c\u6362\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u4e00\u4e2a\u5341\u8fdb\u5236\u6570\u5b57\u8f6c\u6362\u4e3aD509\u8fdb\u5236\uff0c\u4e5f\u53ef\u4ee5\u5c06\u4e00\u4e2aD509\u8fdb\u5236\u6570\u5b57\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u8fd9\u79cd\u8fdb\u5236\u8f6c\u6362\u65b9\u6cd5\u7684\u57fa\u672c\u539f\u7406\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528\u5b83\u6765\u5b9e\u73b0D509\u8f6c10\u8fdb\u5236\u7684\u64cd\u4f5c\u3002<\/p>\n
D509\u8fdb\u5236\u662f\u4e00\u79cd\u8fdb\u5236\u8ba1\u6570\u7cfb\u7edf\uff0c\u5b83\u5c06\u5341\u8fdb\u5236\u6570\u5b57\u8f6c\u6362\u4e3a\u4e00\u79cd\u75319\u4e2a\u6570\u5b57\u7ec4\u6210\u7684\u6570\u5b57\u7cfb\u7edf\uff0c\u5176\u4e2d9\u8868\u793a\u6700\u5927\u503c\uff0c0\u8868\u793a\u6700\u5c0f\u503c\u3002\u4f8b\u5982\uff0c\u5341\u8fdb\u5236\u6570\u5b57\u201c123\u201d\u5c06\u88ab\u8f6c\u6362\u4e3aD509\u8fdb\u5236\u6570\u5b57\u201c1409\u201d\uff0c\u5176\u4e2d\u201c1\u201d\u8868\u793a9\uff0c\u201c4\u201d\u8868\u793a4\uff0c\u201c0\u201d\u8868\u793a0\uff0c\u201c9\u201d\u8868\u793a9\u3002<\/p>\n
\u8f6c\u6362D509\u8fdb\u5236\u5230\u5341\u8fdb\u5236\u7684\u539f\u7406\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5c06\u6bcf\u4e00\u4f4d\u7684D509\u6570\u5b57\u4e58\u4ee5\u76f8\u5e94\u7684\u6743\u91cd\uff0c\u7136\u540e\u5c06\u6240\u6709\u7684\u7ed3\u679c\u76f8\u52a0\u5373\u53ef\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u5982\u679c\u8981\u5c06D509\u6570\u5b57\u201c1409\u201d\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\uff0c\u53ef\u4ee5\u6309\u7167\u5982\u4e0b\u6b65\u9aa4\uff1a<\/p>\n
\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u8ba1\u7b97\u5668\uff0c\u8ba1\u7b97\u5668\u53ef\u4ee5\u76f4\u63a5\u5c06D509\u6570\u5b57\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u6570\u5b57\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8981\u5c06D509\u6570\u5b57\u201c1409\u201d\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\uff0c\u53ef\u4ee5\u5728\u8ba1\u7b97\u5668\u4e0a\u8f93\u5165\u201c1409\u201d\uff0c\u7136\u540e\u6309\u4e0b\u201c=\u201d\u952e\uff0c\u5373\u53ef\u5f97\u5230\u5341\u8fdb\u5236\u6570\u5b57\u201c45\u201d\u3002<\/p>\n
D509\u8f6c10\u8fdb\u5236\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4ee3\u7801\u6765\u5b9e\u73b0\uff0c\u4f8b\u5982\uff0c\u4f7f\u7528C\u8bed\u8a00\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n
int D509to10(char* D509) { int result = 0;<\/p>
int weight = 1;<\/p>
for (int i = strlen(D509) - 1; i >= 0; i--) {<\/p>
result += (D509[i] - '0') * weight;<\/p>
weight *= 9;<\/p>
}<\/p>
return result;<\/p> }<\/code><\/pre>\n
\u4f7f\u7528\u8be5\u51fd\u6570\u53ef\u4ee5\u5c06D509\u6570\u5b57\u201c1409\u201d\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u6570\u5b57\u201c45\u201d\u3002<\/p>\n
\u603b\u7ed3<\/h2>\n
D509\u8f6c10\u8fdb\u5236\u662f\u4e00\u79cd\u5e38\u7528\u7684\u8fdb\u5236\u8f6c\u6362\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u4e00\u4e2aD509\u8fdb\u5236\u6570\u5b57\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u3002<\/strong>D509\u8fdb\u5236\u662f\u4e00\u79cd\u75319\u4e2a\u6570\u5b57\u7ec4\u6210\u7684\u6570\u5b57\u7cfb\u7edf\uff0c\u8f6c\u6362D509\u8fdb\u5236\u5230\u5341\u8fdb\u5236\u7684\u539f\u7406\u662f\u5c06\u6bcf\u4e00\u4f4d\u7684D509\u6570\u5b57\u4e58\u4ee5\u76f8\u5e94\u7684\u6743\u91cd\uff0c\u7136\u540e\u5c06\u6240\u6709\u7684\u7ed3\u679c\u76f8\u52a0\u3002D509\u8f6c10\u8fdb\u5236\u53ef\u4ee5\u4f7f\u7528\u8ba1\u7b97\u5668\u6216\u8005\u4ee3\u7801\u6765\u5b9e\u73b0\uff0c\u4f8b\u5982\uff0c\u4f7f\u7528C\u8bed\u8a00\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0a\u63d0\u4f9b\u7684\u51fd\u6570\u6765\u5b9e\u73b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"D509\u8f6c10\u8fdb\u5236\u662f\u8ba1\u7b97\u673a\u79d1\u5b66\u4e2d\u5e38\u7528\u7684\u4e00\u79cd\u8fdb\u5236\u8f6c\u6362\u65b9\u6cd5\uff0c\u5b83\u53ef\u4ee5\u5c06\u4e00\u4e2a\u5341\u8fdb\u5236\u6570\u5b57\u8f6c\u6362\u4e3aD509\u8fdb\u5236\uff0c\u4e5f\u53ef\u4ee5\u5c06\u4e00\u4e2aD509\u8fdb\u5236\u6570\u5b57\u8f6c\u6362\u4e3a\u5341\u8fdb\u5236\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u8fd9\u79cd\u8fdb\u5236\u8f6c\u6362\u65b9\u6cd5\u7684\u57fa<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-40326","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/40326","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=40326"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/40326\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=40326"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=40326"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=40326"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}