{"id":74,"date":"2025-10-16T01:39:17","date_gmt":"2025-10-15T17:39:17","guid":{"rendered":"https:\/\/www.yiersan79.com\/?p=74"},"modified":"2025-10-18T22:23:42","modified_gmt":"2025-10-18T14:23:42","slug":"%e4%b8%80%e5%85%83%e4%b8%80%e6%ac%a1%e6%96%b9%e7%a8%8b%e6%b1%82%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.yiersan79.com\/index.php\/2025\/10\/16\/%e4%b8%80%e5%85%83%e4%b8%80%e6%ac%a1%e6%96%b9%e7%a8%8b%e6%b1%82%e8%a7%a3\/","title":{"rendered":"\u4e00\u5143\u4e00\u6b21\u65b9\u7a0b\u6c42\u89e3"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u8f93\u5165\u4e00\u4e2a\u4ec5\u7531\u6574\u6570\u3001\u67d0\u4e2a\u5c0f\u5199\u5b57\u6bcd\u4ee5\u53ca<code>'+'<\/code>\uff0c<code>'-'<\/code>\uff0c<code>'='<\/code>\u4e09\u79cd\u6570\u5b66\u7b26\u53f7\u7ec4\u6210\u7684\u4e00\u5143\u4e00\u6b21\u65b9\u7a0b\uff0c\u65b9\u7a0b\u4e2d\u7684\u5c0f\u5199\u5b57\u6bcd\u4ee3\u8868\u672a\u77e5\u6570\uff0c\u5e76\u4e14\uff1a(1) \u56e0\u4e3a\u8fd9\u662f\u4e00\u5143\u4e00\u6b21\u65b9\u7a0b\uff0c\u6240\u4ee5\u53ea\u6709\u4e00\u79cd\u5b57\u6bcd\u4f1a\u51fa\u73b0\u5728\u65b9\u7a0b\u4e2d\uff1b(2) \u6240\u6709\u65b9\u7a0b\u4e2d\u51fa\u73b0\u7684\u6240\u6709\u6574\u6570\u90fd\u5c0f\u4e8e10000\uff1b(3) \u8bf7\u6ce8\u610f\uff0c\u51cf\u53f7\u5b57\u7b26<code>'-'<\/code>\u4e5f\u53ef\u4ee5\u4f5c\u4e3a\u8d1f\u53f7\u4f7f\u7528\uff1b(4) \u8bf7\u6ce8\u610f\uff0c\u5f53\u7ed3\u679c\u4e3a0\u65f6\u5e94\u907f\u514d\u7b54\u6848\u5177\u6709\u8d1f\u53f7\u3002\u5f62\u5982<code>x=-0.000<\/code>\u7684\u7b54\u6848\u4e0d\u53ef\u5f97\u5206\u3002\u9898\u76ee\u4fdd\u8bc1\u8f93\u5165\u7684\u6240\u6709\u4e00\u5143\u4e00\u6b21\u65b9\u7a0b\u5747\u662f\u4e00\u4e2a\u5408\u6cd5\u7684\u65b9\u7a0b\u4e14\u6709\u552f\u4e00\u5b9e\u6570\u89e3\uff0c\u4f8b\u5982\u4e0b\u97623\u4e2a\u4e00\u5143\u4e00\u6b21\u65b9\u7a0b\u90fd\u662f\u5408\u6cd5\u7684\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>a+1=2<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>2x-4=x+8 <\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>-7+z=10086<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8f93\u5165\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f93\u5165\u4e00\u884c\u5b57\u7b26\u4e32\uff0c\u5373\u9898\u76ee\u6240\u8ff0\u7684\u4e00\u5143\u4e00\u6b21\u65b9\u7a0b\u3002\u5b57\u7b26\u4e32\u957f\u5ea6\u5c0f\u4e8e100\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8f93\u51fa\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f93\u51fa\u4e00\u4e2a\u5b57\u6bcd\u3001\u5b57\u7b26<code>'='<\/code>\u548c\u4e00\u4e2a\u4fdd\u7559\u5230\u5c0f\u6570\u70b9\u540e\u4e09\u4f4d\u7684\u5c0f\u6570\uff0c\u8868\u793a\u4e00\u5143\u4e00\u6b21\u65b9\u7a0b\u7684\u89e3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8f93\u5165\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">a+1=2a-9<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8f93\u51fa\u793a\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">a=10.000<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:python decode:true \">def reverse_var(var):\n    if '-' in var:\n        res = var[1:]\n    elif '+' in var:\n        res = '-' + var[1:]\n    else:\n        res = '-' + var\n    return res\n\n\nif __name__ == '__main__':\n    s = input()\n    x = ''\n    var = ''\n    is_reverse = False\n    coff_list = []\n    const_list = []\n    for i in range(len(s)):\n        if x == '' and s[i].isalpha():\n            x = s[i]\n            break\n    for i in range(len(s)):\n        if s[i] == x:\n            coff_list.append(reverse_var(var) if is_reverse else var)\n            var = ''\n            continue\n        if s[i] == '=':\n            if var != '':\n                const_list.append(reverse_var(var) if is_reverse else var)\n            is_reverse = True\n            var = ''\n            continue\n        var = var + s[i]\n    if var != '':\n        const_list.append(reverse_var(var) if is_reverse else var)\n    print(coff_list)\n    print(const_list)\n    coff_list = list(map(int, coff_list))\n    const_list = list(map(int, const_list))\n    ans = sum(const_list) \/ sum(coff_list) * (-1)\n    print(x + \"=\" + f\"{ans:.3f}\")\n<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8f93\u5165\u4e00\u4e2a\u4ec5\u7531\u6574\u6570\u3001\u67d0\u4e2a\u5c0f\u5199\u5b57\u6bcd\u4ee5\u53ca&#8217;+&#8217;\uff0c&#8217;-&#8216;\uff0c&#8217;=&#8217;\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-oj"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":4,"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/posts\/74\/revisions\/78"}],"wp:attachment":[{"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yiersan79.com\/index.php\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}