#include<stdio.h>
#include<math.h>
int main()
{
int i,j,k;
double sum;
int n,N;
scanf("%d",&n);
while(n--)
{
sum=0;
scanf("%d",&N);
for(j=1;j<=N;j++)
sum+=log10(j);
k=(int)sum+1;
printf("%d\n",k);
}
return 0;
}
转载于:https://www.cnblogs.com/brucebao/archive/2013/06/10/3130658.html