复制
收藏
提问
全网

#include<iostream> #include<cstring> using namespace std; int a[100000],n,i,y,xy[100000]; int main() { cin>>n; a[0]=1; a[1]=1; for (y=1;y<=n;y++) { memset(xy,0,sizeof(xy)); xy[0]=a[0]; for (i=1;i<=a[0];i++) { xy[i]+=a[i]*y; xy[i+1]=xy[i]/10; xy[i]%=10; } while (xy[xy[0]+1]>0) { xy[xy[0]+2]=xy[xy[0]+1]/10; xy[xy[0]+1]%=10; xy[0]++; } for (i=1;i<=xy[0];i++) a[i]=xy[i]; a[0]=xy[0]; } for (i=a[0];i>=1;i--) cout<<a[i]; cout<<endl; return 0; } 模拟

d513a8a6f
刚刚
全网
文档
学术
百科
知识库
时间不限
自动

理解问题#include<iostream> #include<cstring> using namespace std; int a[100000],n,i,y,xy[100000]; int main() { cin>>n; a[0]=1; a[1]=1; for (y=1;y<=n;y++) { memset(xy,0,sizeof(xy)); xy[0]=a[0]; for (i=1;i<=a[0];i++) { xy[i]+=a[i]*y; xy[i+1]=xy[i]/10; xy[i]%=10; } while (xy[xy[0]+1]>0) { xy[xy[0]+2]=xy[xy[0]+1]/10; xy[xy[0]+1]%=10; xy[0]++; } for (i=1;i<=xy[0];i++) a[i]=xy[i]; a[0]=xy[0]; } for (i=a[0];i>=1;i--) cout<<a[i]; cout<<endl; return 0; } 模拟

已完成理解#include<iostream> #include<cstring> using namespace std; int a[100000],n,i,y,xy[100000]; int main() { cin>>n; a[0]=1; a[1]=1; for (y=1;y<=n;y++) { memset(xy,0,sizeof(xy)); xy[0]=a[0]; for (i=1;i<=a[0];i++) { xy[i]+=a[i]*y; xy[i+1]=xy[i]/10; xy[i]%=10; } while (xy[xy[0]+1]>0) { xy[xy[0]+2]=xy[xy[0]+1]/10; xy[xy[0]+1]%=10; xy[0]++; } for (i=1;i<=xy[0];i++) a[i]=xy[i]; a[0]=xy[0]; } for (i=a[0];i>=1;i--) cout<<a[i]; cout<<endl; return 0; } 模拟

展开阅读网页

更专业一些
转笔记
专业
#include<iostream> #include<cstring> using namespace std; int a[100000],n,i,y,xy[100000]; int main() { cin>>n; a[0]=1; a[1]=1; for (y=1;y<=n;y++) { memset(xy,0,sizeof(xy)); xy[0]=a[0]; for (i=1;i<=a[0];i++) { xy[i]+=a[i]*y; xy[i+1]=xy[i]/10; xy[i]%=10; } while (xy[xy[0]+1]>0) { xy[xy[0]+2]=xy[xy[0]+1]/10; xy[xy[0]+1]%=10; xy[0]++; } for (i=1;i<=xy[0];i++) a[i]=xy[i]; a[0]=xy[0]; } for (i=a[0];i>=1;i--) cout<<a[i]; cout<<endl; return 0; } 模拟
不在提醒

更专业内容正在努力生成中
知识树
#include<iostream> #include<cstring> using namespace std; int a[100000],n,i,y,xy[100000]; int main() { cin>>n; a[0]=1; a[1]=1; for (y=1;y<=n;y++) { memset(xy,0,sizeof(xy)); xy[0]=a[0]; for (i=1;i<=a[0];i++) { xy[i]+=a[i]*y; xy[i+1]=xy[i]/10; xy[i]%=10; } while (xy[xy[0]+1]>0) { xy[xy[0]+2]=xy[xy[0]+1]/10; xy[xy[0]+1]%=10; xy[0]++; } for (i=1;i<=xy[0];i++) a[i]=xy[i]; a[0]=xy[0]; } for (i=a[0];i>=1;i--) cout<<a[i]; cout<<endl; return 0; } 模拟
阶乘计算的数学原理是什么?
如何优化大数阶乘的算法?
阶乘在数学中有哪些应用?

以上内容由AI搜集生成,仅供参考

在线客服