{"id":13119,"date":"2022-11-23T10:54:55","date_gmt":"2022-11-23T02:54:55","guid":{"rendered":"https:\/\/fgchen.com\/wpedu\/?p=13119"},"modified":"2026-03-30T14:33:02","modified_gmt":"2026-03-30T06:33:02","slug":"tqc-%e7%a8%8b%e5%bc%8f%e8%aa%9e%e8%a8%80python-303-%e8%bf%b4%e5%9c%88%e6%95%b8%e5%80%bc%e7%9b%b8%e4%b9%98","status":"publish","type":"post","link":"https:\/\/fgchen.com\/wpedu\/2022\/11\/tqc-%e7%a8%8b%e5%bc%8f%e8%aa%9e%e8%a8%80python-303-%e8%bf%b4%e5%9c%88%e6%95%b8%e5%80%bc%e7%9b%b8%e4%b9%98\/","title":{"rendered":"TQC+ \u7a0b\u5f0f\u8a9e\u8a00Python 303 \u8ff4\u5708\u6578\u503c\u76f8\u4e58"},"content":{"rendered":"1. \u984c\u76ee\u8aaa\u660e:\r\n\u8acb\u958b\u555fPYD303.py\u6a94\u6848\uff0c\u4f9d\u4e0b\u5217\u984c\u610f\u9032\u884c\u4f5c\u7b54\uff0c\u4f9d\u8f38\u5165\u503c\u4ee5\u4e09\u89d2\u5f62\u7684\u65b9\u5f0f\u8f38\u51fa\u6b64\u6578\u76f8\u4e58\u7d50\u679c\uff0c\u4f7f\u8f38\u51fa\u503c\u7b26\u5408\u984c\u610f\u8981\u6c42\u3002\u4f5c\u7b54\u5b8c\u6210\u8acb\u53e6\u5b58\u65b0\u6a94\u70baPYA303.py\u518d\u9032\u884c\u8a55\u5206\u3002\r\n\r\n2. \u8a2d\u8a08\u8aaa\u660e\uff1a\r\n\u8acb\u4f7f\u7528\u8ff4\u5708\u6558\u8ff0\u64b0\u5beb\u4e00\u7a0b\u5f0f\uff0c\u8b93\u4f7f\u7528\u8005\u8f38\u5165\u4e00\u500b\u6b63\u6574\u6578\uff08&lt;100\uff09\uff0c\u7136\u5f8c\u4ee5\u4e09\u89d2\u5f62\u7684\u65b9\u5f0f\u4f9d\u5e8f\u8f38\u51fa\u6b64\u6578\u7684\u76f8\u4e58\u7d50\u679c\u3002\r\n\r\n\u63d0\u793a\uff1a\u8f38\u51fa\u6b04\u5bec\u70ba4\uff0c\u4e14\u9700\u9760\u53f3\u5c0d\u9f4a\u3002\r\n\r\n3. \u8f38\u5165\u8f38\u51fa\uff1a\r\n\u8f38\u5165\u8aaa\u660e\r\n\u4e00\u500b\u6b63\u6574\u6578\uff08&lt;100\uff09\r\n\r\n\u8f38\u51fa\u8aaa\u660e\r\n\u4ee5\u4e09\u89d2\u5f62\u7684\u65b9\u5f0f\u4f9d\u5e8f\u8f38\u51fa\u6b64\u6578\u7684\u968e\u4e58\u7d50\u679c\r\n\r\n&nbsp;\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\"># TODO\r\na = int(input())\r\n\r\ni = 1\r\nwhile i &lt;= a:\r\n\r\n    print('%4d' %(i), end='')\r\n\r\n    sum = i\r\n    j = 1\r\n    while j &lt; i:\r\n        sum = sum + i\r\n        print('%4d' %(sum), end='')\r\n        j = j + 1\r\n    \r\n    i = i + 1\r\n    print()\r\n<\/pre>\r\n&nbsp;","protected":false},"excerpt":{"rendered":"<p>1. \u984c\u76ee\u8aaa\u660e: \u8acb\u958b\u555fPYD303.py\u6a94\u6848\uff0c\u4f9d\u4e0b\u5217\u984c\u610f\u9032\u884c\u4f5c\u7b54\uff0c\u4f9d\u8f38\u5165\u503c\u4ee5\u4e09 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[266],"tags":[],"class_list":["post-13119","post","type-post","status-publish","format-standard","hentry","category-266"],"_links":{"self":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts\/13119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/comments?post=13119"}],"version-history":[{"count":2,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts\/13119\/revisions"}],"predecessor-version":[{"id":13684,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts\/13119\/revisions\/13684"}],"wp:attachment":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/media?parent=13119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/categories?post=13119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/tags?post=13119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}