摘要:
超级台阶时间限制:1000 ms | 内存限制:65535 KB难度:3描述有一楼梯共m级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第m级,共有多少走法?注:规定从一级到一级有0种走法。输入输入数据首先包含一个整数n(1int fun(int d,int a,int b){ int c; c=a+b; a=b; b=c; d-=1; if(d==0) return c; else if(d>0) c=fun(d,a,b); }int main(){ int a,b,n; scanf("%d",&n); while(n--) {... 阅读全文
posted @ 2013-08-20 10:34
王莜轩
阅读(394)
评论(0)
推荐(0)

浙公网安备 33010602011771号