大数阶乘位数

#include<stdio.h>
#include<math.h>
int main()
{
    int n;
    __int64 t;
    double sum,i;
    scanf("%d",&n);
    while(n--){
        sum=0;
        scanf("%I64d",&t);
        for(i=1;i<=t;i++)
            sum+=log10(i);
        sum++;
        printf("%d
",int(sum));
    }
    return 0;
}
//M阶乘位数:
//log10(1)+log10(2)+···+long10(M)取整后加1
原文地址:https://www.cnblogs.com/cheng07045406/p/3234852.html