葉林
Linked with GitHub
# LeetCode - 0070. Climbing Stairs ### 題目網址:https://leetcode.com/problems/climbing-stairs/ ###### tags: `LeetCode` `Easy` `模擬` ```cpp= /* -LeetCode format- Problem: 70. Climbing Stairs Difficulty: Easy by Inversionpeter */ class Solution { public: int climbStairs(int n) { unsigned first = 1, second = 2, temporary; while (--n) temporary = first + second, first = second, second = temporary; return first; } }; ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up