1
22万
论坛元老
void xinfeng(int n)//信封 n个信封 均装错 { long long a[21]={0};//注意数据长度 a[1]=0; a[2]=1; for(int i=3;i<=n;i++) { a[i]=(i-1)*(a[i-1]+a[i-2]);//需要递推计算 } cout<<a[n]; }[i] }
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|DiscuzX
GMT+8, 2025-5-29 05:26 , Processed in 0.051186 second(s), 23 queries .
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.. 技术支持 by 巅峰设计