{"id":25667,"date":"2019-11-03T16:08:11","date_gmt":"2019-11-03T08:08:11","guid":{"rendered":"https:\/\/www.growthhk.cn\/?p=25667"},"modified":"2019-11-03T16:08:11","modified_gmt":"2019-11-03T08:08:11","slug":"%e4%ba%a7%e5%93%81%e7%bb%8f%e7%90%86%e7%9a%84%e6%95%85%e4%ba%8b%ef%bc%9a%e4%ba%a7%e5%93%81%e7%bb%8f%e7%90%86%e6%8b%bf%e9%94%99%e4%ba%86%e5%88%ab%e4%ba%ba%e7%9a%84%e5%a4%96%e5%8d%96","status":"publish","type":"post","link":"https:\/\/www.growthhk.cn\/quan\/25667.html","title":{"rendered":"\u4ea7\u54c1\u7ecf\u7406\u7684\u6545\u4e8b\uff1a\u4ea7\u54c1\u7ecf\u7406\u62ff\u9519\u4e86\u522b\u4eba\u7684\u5916\u5356"},"content":{"rendered":"\n

<\/p>\n\n\n\n

\u4ea7\u54c1\u7ecf\u7406<\/a><\/span>\u4e2d\u5348\u6ca1\u6709\u8d76\u4e0a\u98df\u5802\u7684\u5348\u996d\uff0c\u4e8e\u662f\u7ea0\u96c6\u4e86\u4e00\u6279\u4eba\u4e00\u8d77\u70b9\u5916\u5356\u3002\u7136\u800c\u6b63\u5f53\u5979\u8981\u4e0b\u5355\u65f6\uff0c\u8001\u677f\u627e\u5979\u5f00\u4f1a\uff0c\u4e8e\u662f\u5979\u8ba9\u5f00\u53d1\u5c0f\u54e5\u968f\u4fbf\u5e2e\u5fd9\u70b9\u4e00\u4efd\u3002<\/p>\n\n\n\n

\u4ea7\u54c1\u7ecf\u7406\u5f00\u5b8c\u4f1a\u56de\u6765\u4ee5\u540e\uff0c\u53d1\u73b0\u8fd8\u5269\u4e09\u4efd\u5916\u5356\u6ca1\u6709\u4eba\u62ff\uff0c\u5206\u522b\u662f\u9cb1\u9c7c\u6c64\u3001\u87ba\u86f3\u7c89\u548c\u5927\u80a0\u523a\u8eab\u3002\u6b64\u65f6\u5f00\u53d1\u5c0f\u54e5\u78b0\u5de7\u4e0d\u5728\uff0c\u4ea7\u54c1\u7ecf\u7406\u4e00\u65f6\u4e0d\u77e5\u9053\u54ea\u4e00\u4efd\u624d\u662f\u81ea\u5df1\u7684\u3002<\/p>\n\n\n\n

\u4ea7\u54c1\u7ecf\u7406\u60f3\u968f\u4fbf\u9009\u4e00\u4efd\uff0c\u4e8e\u662f\u9009\u4e86\u9cb1\u9c7c\u6c64\u3002\u6b63\u5f53\u5979\u62b1\u8d77\u9cb1\u9c7c\u6c64\u51c6\u5907\u8d70\u65f6\uff0c\u5f00\u53d1\u5c0f\u54e5\u98ce\u98ce\u706b\u706b\u8dd1\u8fc7\u6765\uff0c\u62ff\u7740\u87ba\u86f3\u7c89\u53c8\u8dd1\u4e86\uff0c\u4ea7\u54c1\u7ecf\u7406\u751a\u81f3\u6765\u4e0d\u53ca\u8be2\u95ee\u54ea\u4e00\u4e2a\u624d\u662f\u81ea\u5df1\u7684\u3002<\/p>\n\n\n\n

\u4ea7\u54c1\u7ecf\u7406\u4e00\u60f3\uff0c\u867d\u7136\u81ea\u5df1\u662f\u6587\u79d1\u751f\uff0c\u4f46\u662f\u73b0\u5728\u53ea\u5269\u4e24\u4e2a\u5916\u5356\uff0c\u9009\u54ea\u4e00\u4e2a\u90fd\u662f\u4e8c\u5206\u4e4b\u4e00\u7684\u6982\u7387\u3002\u6240\u4ee5\u76f4\u63a5\u62ff\u8d70\u4e86\u9cb1\u9c7c\u6c64\u3002<\/p>\n\n\n\n

3 \u5206\u949f\u4ee5\u540e\uff0c\u7814\u7a76\u5458\u5c0f\u54e5\u5486\u54ee\u4e00\u58f0\uff1a\u8c01\u62ff\u8d70\u4e86\u6211\u7684\u9cb1\u9c7c\u6c64\uff1f<\/p>\n\n\n\n

\u4ea7\u54c1\u7ecf\u7406\u8d76\u7d27\u559d\u5b8c\u4e86\u6c64\uff0c\u82e5\u65e0\u5176\u4e8b\u5730\u628a\u9cb1\u9c7c\u6c64\u7684\u5305\u88c5\u6254\u8fdb\u4e86\u5783\u573e\u6876\u3002<\/p>\n\n\n\n

\u8eb2\u5728\u6697\u5904\u7684\u5f00\u53d1\u5c0f\u54e5\u6ce8\u89c6\u7740\u521a\u624d\u53d1\u751f\u7684\u4e00\u5207\uff0c\u7528\u4e2d\u6307\u63a8\u4e86\u63a8\u773c\u955c\uff0c\u955c\u7247\u4e0a\u4e00\u9053\u5149\u8292\u95ea\u8fc7\uff0c\u8f6c\u8eab\u8d70\u5411\u4e86\u5395\u6240\u3002<\/p>\n\n\n\n

\u5176\u5b9e\uff0c\u5f00\u53d1\u5c0f\u54e5\u5728\u4e0d\u4e45\u4e4b\u524d\u624d\u6559\u4f1a\u4e86\u4ea7\u54c1\u7ecf\u7406\u4f7f\u7528 Python\uff0c\u5982\u679c\u4ea7\u54c1\u7ecf\u7406\u5199\u51e0\u884c\u4ee3\u7801\u9a8c\u8bc1\u4e00\u4e0b\u6982\u7387\uff0c\u5c31\u4f1a\u53d1\u73b0\u4e8b\u60c5\u5e76\u4e0d\u7b80\u5355\u3002<\/p>\n\n\n\n

\u6211\u4eec\u5047\u8bbe\uff1a<\/p>\n\n\n\n

  1. \u8fd9\u4e09\u4e2a\u5916\u5356\u91cc\u9762\uff0c\u6709\u4e14\u53ea\u6709\u4e00\u4efd\u662f\u4ea7\u54c1\u7ecf\u7406\u7684<\/li>
  2. \u5f00\u53d1\u5c0f\u54e5\u8dd1\u8fc7\u6765\uff0c\u4e0d\u4f1a\u62a2\u4ea7\u54c1\u7ecf\u7406\u624b\u4e0a\u62ff\u7740\u7684\u5916\u5356<\/li>
  3. \u5f00\u53d1\u5c0f\u54e5\u62ff\u8d70\u7684\uff0c\u4e00\u5b9a\u4e0d\u662f\u5c5e\u4e8e\u4ea7\u54c1\u7ecf\u7406\u7684\u5916\u5356<\/li><\/ol>\n\n\n\n
    import random\noptions = {'\u9cb1\u9c7c\u6c64', '\u87ba\u86f3\u7c89', '\u5927\u80a0\u523a\u8eab'}\npm = random.choice(list(options))  # \u5f00\u53d1\u5c0f\u54e5\u7ed9\u4ea7\u54c1\u7ecf\u7406\u70b9\u7684\u5916\u5356\nright = 0\nfor _ in range(100000):    \nguess = random.choice(list(options)) # \u4ea7\u54c1\u7ecf\u7406\u968f\u673a\u9009\u7684\u5916\u5356    \n\n# \u5f00\u53d1\u5c0f\u54e5\u4f1a\u4ece\u5269\u4e0b\u7684\u4e24\u4e2a\u5916\u5356\u4e2d\uff0c\u62ff\u8d70\u4e0d\u5c5e\u4e8e\u4ea7\u54c1\u7ecf\u7406\u7684\u4e00\u4e2a    \nexclude_options = options - {guess, pm}    \nexclude = random.choice(list(exclude_options))    \n# \u5982\u679c\u4ea7\u54c1\u7ecf\u7406\u6b64\u65f6\u66f4\u6362\u4e86\u9009\u9879    \n\nnew_guess_option = options - {exclude, guess}    \nnew_guess = random.choice(list(new_guess_option))    \nif new_guess == pm:        \nright += 1\nprint(right \/ 100000)<\/code><\/pre>\n\n\n\n

    \u8fd0\u884c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n

    \"\"<\/figure><\/div>\n\n\n\n

    \u5982\u679c\u4ea7\u54c1\u7ecf\u7406\u5728\u770b\u5230\u5f00\u53d1\u5c0f\u54e5\u62ff\u8d70\u4e86\u5916\u5356\u4ee5\u540e\uff0c\u66f4\u6362\u81ea\u5df1\u7684\u9009\u62e9\uff0c\u90a3\u4e48\u9009\u5bf9\u7684\u6982\u7387\u662f 2\/3.\u5982\u679c\u4e0d\u66f4\u6362\u81ea\u5df1\u7684\u9009\u62e9\uff0c\u9009\u4e2d\u7684\u6982\u7387\u4e3a 1\/3.<\/p>\n\n\n\n

    \u76f8\u4fe1\u5f88\u591a\u4eba\u90fd\u4f1a\u8ddf\u4ea7\u54c1\u7ecf\u7406\u4e00\u6837\uff0c\u89c9\u5f97\u9009\u5bf9\u7684\u6982\u7387\u662f 1\/2.\u5bf9\u4ee3\u7801\u7684\u8ba1\u7b97\u7ed3\u679c\u611f\u5230\u60ca\u8bb6\uff0c\u8fd9\u975e\u5e38\u8fdd\u53cd\u76f4\u89c9\u3002<\/p>\n\n\n\n

    \u5176\u5b9e\uff0c\u6574\u4e2a\u95ee\u9898\u7684\u5173\u952e\u5728\u4e8e\uff0c\u5f00\u53d1\u5c0f\u54e5\u4e0d\u662f\u968f\u673a\u4ece\u5269\u4e0b\u7684\u4e24\u4e2a\u5916\u5356\u4e2d\u62ff\u8d70\u4e00\u4e2a\u3002\u5f00\u53d1\u5c0f\u54e5\u62ff\u8d70\u7684\u4e00\u5b9a\u662f\u4e0d\u5c5e\u4e8e\u4ea7\u54c1\u7ecf\u7406\u7684\u5916\u5356\u3002<\/p>\n\n\n\n

    \u76f8\u4fe1\u5f88\u591a\u4eba\u4e0d\u60f3\u770b\u6982\u7387\u516c\u5f0f\uff0c\u6240\u4ee5\u6211\u4eec\u4eca\u5929\u4e0d\u7528\u6982\u7387\u6765\u89e3\u91ca\u3002\u6211\u53e6\u5916\u4e3e\u4e00\u4e2a\u4f8b\u5b50\uff1a<\/p>\n\n\n\n

    \u6211\u73b0\u5728\u6709\u4e09\u4e2a\u76d2\u5b50\uff0c\u5176\u4e2d\u4e00\u4e2a\u76d2\u5b50\u91cc\u9762\u653e\u624b\u673a\u3002\u4f46\u4f60\u4e0d\u77e5\u9053\u624b\u673a\u5728\u54ea\u4e2a\u76d2\u5b50\u91cc\u9762\u3002<\/p>\n\n\n\n

    1. \u4f60\u9009\u4e00\u4e2a\u76d2\u5b50\u653e\u5728\u4f60\u7684\u5305\u91cc\u9762\uff0c\u53e6\u5916\u4e24\u4e2a\u76d2\u5b50\u653e\u5728\u6211\u7684\u5305\u91cc\u9762\uff0c\u6211\u95ee\u4f60\u6362\u4e0d\u6362\u5305\uff0c\u4f60\u4f1a\u6362\u5417\uff1f\u6211\u5305\u91cc\u9762\u6709\u4e24\u4e2a\u76d2\u5b50\uff0c\u6240\u4ee5\u6211\u7684\u5305<\/code>\u91cc\u9762\u6709\u624b\u673a\u7684\u6982\u7387\u662f 2\/3\uff0c\u4f60\u663e\u7136\u8981\u6362\u3002<\/li>
    2. \u4f60\u9009\u4e00\u4e2a\u76d2\u5b50\u653e\u5728\u4f60\u7684\u5305\u91cc\u9762\uff0c\u53e6\u5916\u4e24\u4e2a\u76d2\u5b50\u653e\u5728\u6211\u7684\u5305\u91cc\u9762\uff0c\u7136\u540e\u6211\u4ece\u6211\u5305\u91cc\u9762\u4e22\u6389\u4e00\u4e2a\u7a7a\u76d2\u5b50\uff0c\u518d\u95ee\u4f60\u6362\u4e0d\u6362\u5305\u3002\u6b64\u65f6\uff0c\u6211\u4e22\u6389\u7a7a\u76d2\u5b50\u5e76\u4e0d\u4f1a\u5f71\u54cd\u6211\u5305\u91cc\u9762\u6709\u624b\u673a\u7684\u6982\u7387\u4e3a 2\/3.\u4f60\u663e\u7136\u8981\u6362\u3002<\/li>
    3. \u73b0\u5728\u53bb\u6389\u5305<\/code>\u8fd9\u4e2a\u53ef\u6709\u53ef\u65e0\u7684\u4e1c\u897f\u2014\u2014\u4f60\u9009\u4e00\u4e2a\u76d2\u5b50\uff0c\u6211\u4ece\u5269\u4e0b\u4e24\u4e2a\u76d2\u5b50\u91cc\u9762\u6254\u6389\u4e00\u4e2a\u7a7a\u76d2\u5b50\uff0c\u95ee\u4f60\u8981\u4e0d\u8981\u66f4\u6362\u9009\u62e9\uff1f\u4f60\u8bf4\u6362\u4e0d\u6362\uff1f<\/li><\/ol>\n\n\n\n

      \u6700\u540e\u6211\u4eec\u518d\u4ece\u6982\u7387\u4e0a\u6765\u5b9a\u91cf\u89e3\u91ca\u4e00\u4e0b\u8fd9\u4e2a\u95ee\u9898\u3002\u5982\u679c\u4ea7\u54c1\u7ecf\u7406\u59cb\u7ec8\u9009\u62e9\u8981\u66f4\u6362\uff0c\u90a3\u4e48\uff1a<\/p>\n\n\n\n

      1. \u7b2c\u4e00\u6b21\u5c31\u9009\u4e2d\u4e86\u5979\u7684\u5916\u5356\uff0c\u6b64\u65f6\u66f4\u6362\u4ee5\u540e\uff0c\u9009\u5bf9\u7684\u6982\u7387\u4e3a 1\/3 * 0<\/li>
      2. \u7b2c\u4e00\u6b21\u9009\u4e2d\u4e86\u522b\u4eba\u7684\u5916\u5356 1\uff0c\u5f00\u53d1\u5c0f\u54e5\u5fc5\u5b9a\u62ff\u8d70\u522b\u4eba\u7684\u5916\u5356 2\uff0c\u6b64\u65f6\u4ea7\u54c1\u7ecf\u7406\u9009\u5bf9\u7684\u6982\u7387\u4e3a\uff1a1\/3 * 1 = 1\/3<\/li>
      3. \u7b2c\u4e00\u6b21\u9009\u4e2d\u4e86\u522b\u4eba\u7684\u5916\u5356 2\uff0c\u5f00\u53d1\u5c0f\u54e5\u5fc5\u5b9a\u62ff\u8d70\u522b\u4eba\u7684\u5916\u5356 1\uff0c\u6b64\u65f6\u4ea7\u54c1\u7ecf\u7406\u9009\u5bf9\u7684\u6982\u7387\u4e3a\uff1a1\/3 * 1 = 1\/3<\/li><\/ol>\n\n\n\n

        \u6240\u4ee5\u5982\u679c\u9009\u62e9\u8981\u6362\uff0c\u4ea7\u54c1\u7ecf\u7406\u9009\u5bf9\u7684\u6982\u7387\u4e3a0 + 1\/3 + 1\/3 = 2\/3<\/code><\/p>\n\n\n\n

        \u6587\uff1akingname<\/p>\n\n\n\n

        \u9996\u5e2d\u589e\u957f\u5b98CGO\u8350\u8bfb\u9996\u5e2d\u589e\u957f\u5b98\uff1a<\/strong><\/p>\n\n\n\n