标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 32913 Accepted Submission(s): 15481
#include<iostream>
#include <cmath>
using namespace std;
int main()
{
int N=0;
cin>>N;
while(N--)
{
int m=0;
cin>>m;
double number=0;//注意不能是int类型
for(int i=m;i>0;i--)
{
number+=log10(i);
}
cout<<(int)(number+1)<<endl;
}
return 0;
}
标签:
原文地址:http://www.cnblogs.com/honeybusybee/p/5224177.html