#include<stdio.h>
#include<string.h>
#include<iostream>
const int M = 40000;
using namespace std;
int f[M];
int main()
{
int n,i,j;
while(scanf("%d",&n)!=EOF)
{
memset(f,0,sizeof(f));
f[0]=1;
for(i=2; i<=n; i++)
{
int c=0;
for(j=0; j<M; j++)
{
int s=f[j]*i+c;
f[j]=s%10;
c=s/10;
}
}
for(j=M-1; j>=0; j--)
if(f[j])
break;
for(i=j; i>=0; i--)
printf("%d",f[i]);
printf("\n");
}
return 0;
}
07-16
07-16
07-16
07-16
07-16
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交