zzuli 阶乘的最高位
令 N!=x.yyzz*10^k;
两边对10求对数 —> log10(N!)=log10(x.yyzz)+k;
x.yyzz=10^(log10(N!)-(int)log10(N!))
log10(N!)=log10(1)+log10(2)+...log10(N);
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
using namespace std;
#define inf 0x3f3f3f3f
typedef long long LL;
int main()
{
int n;
double a=0.0;
scanf("%d",&n);
for(int i=1; i<=n; i++)
{
a += log10(i);
a -= (int)a;
}
printf("%d\n", (int)pow(10, a));
return 0;
}