标签:
1 #include<stdio.h> 2 #include<string.h> 3 #include<math.h> 4 #include<iostream> 5 #include<algorithm> 6 #include<queue> 7 #include<vector> 8 #include<set> 9 #include<stack> 10 #include<string> 11 #include<sstream> 12 #include<map> 13 #include<cctype> 14 #include<limits.h> 15 using namespace std; 16 int main() 17 { 18 double maxn=0; 19 int n,t; 20 scanf("%d",&t); 21 while(t--) 22 { 23 maxn=0; 24 scanf("%d",&n); 25 for(int i=1;i<=n;i++) 26 maxn+=log10(i); 27 printf("%d\n",(int)maxn+1); 28 } 29 }
标签:
原文地址:http://www.cnblogs.com/A-FM/p/5584167.html