标签:class public ret solution int new span return cli
1 class Solution { 2 public int climbStairs(int n) { 3 int[] s = new int[n + 1]; 4 s[1] = 1; s[0] = 1; 5 for(int i = 2; i <= n; i++) { 6 s[i] = s[i - 1] + s[i - 2]; 7 } 8 return s[n]; 9 10 } 11 }
标签:class public ret solution int new span return cli
原文地址:https://www.cnblogs.com/goPanama/p/9399138.html