Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

public class Solution { public int ClimbStairs(int n) { if (n<=0) return 0; return Convert.ToInt32((Math.Pow((Math.Sqrt(5) + 1) / 2, n+1) - Math.Pow((1-Math.Sqrt(5)) / 2, n+1))/Math.Sqrt(5)); } }

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.