#include<bits/stdc++.h> using namespace std; int main() { int N; while(cin>>N) { int a[3001]={0}; int i=0; a[0]=1; while(N) { for(i=0;i<3001;i++) { if(a[i]>=10) { a[i+1]+=a[i]/10; a[i]%=10; } a[i]*=N; } N--; } while(a[i]==0) { i--; } for(;i>=0;i--) cout<<a[i]; cout<<endl; } system("pause"); }
标签:10,高精度,int,--,while,P1134 From: https://www.cnblogs.com/lhf123/p/17398499.html