{"id":5131,"date":"2023-11-16T09:10:28","date_gmt":"2023-11-16T01:10:28","guid":{"rendered":"https:\/\/white-night.club\/?p=5131"},"modified":"2023-11-16T09:10:53","modified_gmt":"2023-11-16T01:10:53","slug":"ad150","status":"publish","type":"post","link":"https:\/\/white-night.club\/index.php\/2023\/11\/16\/ad150\/","title":{"rendered":"70.\u00a0\u722c\u697c\u68af\uff08GO\uff09"},"content":{"rendered":"\n<p>\u5047\u8bbe\u4f60\u6b63\u5728\u722c\u697c\u68af\u3002\u9700\u8981\u00a0<code>n<\/code>\u00a0\u9636\u4f60\u624d\u80fd\u5230\u8fbe\u697c\u9876\u3002<\/p>\n\n\n\n<p>\u6bcf\u6b21\u4f60\u53ef\u4ee5\u722c&nbsp;<code>1<\/code>&nbsp;\u6216&nbsp;<code>2<\/code>&nbsp;\u4e2a\u53f0\u9636\u3002\u4f60\u6709\u591a\u5c11\u79cd\u4e0d\u540c\u7684\u65b9\u6cd5\u53ef\u4ee5\u722c\u5230\u697c\u9876\u5462\uff1f<\/p>\n\n\n\n<p><strong>\u793a\u4f8b 1\uff1a<\/strong><strong>\u8f93\u5165\uff1a<\/strong>n = 2 <strong>\u8f93\u51fa\uff1a<\/strong>2 <strong>\u89e3\u91ca\uff1a<\/strong>\u6709\u4e24\u79cd\u65b9\u6cd5\u53ef\u4ee5\u722c\u5230\u697c\u9876\u3002 1. 1 \u9636 + 1 \u9636 2. 2 \u9636<\/p>\n\n\n\n<p><strong>\u793a\u4f8b 2\uff1a<\/strong><strong>\u8f93\u5165\uff1a<\/strong>n = 3 <strong>\u8f93\u51fa\uff1a<\/strong>3 <strong>\u89e3\u91ca\uff1a<\/strong>\u6709\u4e09\u79cd\u65b9\u6cd5\u53ef\u4ee5\u722c\u5230\u697c\u9876\u3002 1. 1 \u9636 + 1 \u9636 + 1 \u9636 2. 1 \u9636 + 2 \u9636 3. 2 \u9636 + 1 \u9636<\/p>\n\n\n\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n\n\n\n<ul>\n<li><code>1 &lt;= n &lt;= 45<\/code><\/li>\n<\/ul>\n\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<blockquote class=\"wp-block-quote has-luminous-vivid-amber-color has-text-color has-link-color wp-elements-e67f8ff0502a3e11a56e717fbe7ff34c\">\n<p>\u89e3\u9898\u601d\u8def<\/p>\n<cite><em>GO+\u52a8\u6001\u89c4\u5212<\/em><\/cite><\/blockquote>\n\n\n\n<p>\u7528GO\u5199\u4e00\u4e0b\u3002\u627e\u51fa\u9012\u5f52\u65b9\u7a0b\uff08\u5176\u5b9e\u8fd8\u662f\u6590\u6ce2\u90a3\u5951\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>func climbStairs(n int) int {\r\n\tif n&lt;=1{\r\n\t\treturn n\r\n\t}\r\n\tleft,right:=1,1\r\n\tresult:=0\r\n\tfor i:=2;i&lt;=n;i++{\r\n\t\tresult=left+right\r\n\t\tleft=right\r\n\t\tright=result\r\n\t}\r\n\treturn result\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Leetcode\u9898\u76ee\uff1aGO\u52a8\u6001\u89c4\u5212<\/p>\n","protected":false},"author":1,"featured_media":2827,"comment_status":"open","ping_status":"","sticky":false,"template":"base","format":"standard","meta":{"footnotes":""},"categories":[42,25],"tags":[38],"_links":{"self":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/5131"}],"collection":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/comments?post=5131"}],"version-history":[{"count":0,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/5131\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media\/2827"}],"wp:attachment":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media?parent=5131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/categories?post=5131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/tags?post=5131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}