爬楼梯
来源:互联网 发布:网络运营是什么工作 编辑:程序博客网 时间:2024/04/27 18:51
#include <iostream>using namespace std;int com(int m,int n){ if(m < n) return 0;if(n==0)return 1;elsereturn com(m-1,n)+com(m-1,n-1);}int main (){ int n; while (cin>>n) { int sum=0; for (int i=0;i<=n/2;i++) { sum+=com(n-i,i); } cout<<sum<<endl; } return 0;}
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 爬楼梯
- 嵌入式软件学习方法-规划-资料
- 解决编译代码出现/usr/bin/ld: cannot find -luuid错误 .
- 跨模块内存管理的陷阱
- 胖哥的故事
- 视图之UITabBarController结构详解
- 爬楼梯
- vi 字母大小写切换
- 视图之UINavigationController结构解析
- Spring线程池开发实战
- Lessons
- 超级终端显示:Dummy_isr error,interrupt number: 0. INTMSK=oxbffffeff
- KMP算法~看的清楚~
- ioctl
- Android adb