2
24
新手上路
void shanglouti(int n)//上楼梯 { int a[101]; a[1]=1; a[2]=2; for(int i=3;i<=n;i++) a[i]=(a[i-1]+a[i-2])%10000007; cout<<a[n]; }
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|DiscuzX
GMT+8, 2025-2-13 02:03 , Processed in 0.045680 second(s), 22 queries .
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.. 技术支持 by 巅峰设计