题解 | #mxh爬楼梯#

mxh爬楼梯

https://ac.nowcoder.com/acm/problem/14631

#include   <bits/stdc++.h>

using   namespace std;

int n;

int pd(int m){

  if(m>=n)  {     

      return 1;

  }

  return pd(m+3)+pd(m+2);

}

int main(){

    cin>>n;

    cout<<pd(0);

}

 

全部评论

相关推荐

评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务