计算某个大数的阶乘之后的位数,可以利用公式
ans(N)=log10(1)+log10(2)+……+log10(N)+1
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
int main()
{
int i,j,count,T;
double k;
scanf("%d",&T);
while(T--)
{
scanf("%d",&i);
k=1;
for(j=1;j<=i;j++)
{
k+=log10((double)j);
}
printf("%d\n",(int)k);
}
return 0;
}