#include<iostream>
#include<vector>
using namespace std;
int main(){
vector<int> vi(10005, 0);
vi[0]=1;
int r=0, n, flag=0;
cin>>n;
for(int i=1; i<=n; i++)
for(int j=0; j<10005; j++){
int t=vi[j]*i+r;
r=t/10;
vi[j]=t%10;
}
for(int i=10004; i>=0; i--){
if(vi[i]!=0) flag=1;
if(flag==1) cout<<vi[i];
}
cout<<endl;
return 0;
}
转载于:https://www.cnblogs.com/A-Little-Nut/p/10328140.html