题目链接“:HDU1018
#include<iostream> #include<cmath> #include<cstdio> using namespace std; int main() { int kase;cin>>kase; while(kase--) { int n;cin>>n; double num=0;; for(int i=2;i<=n;i++) num+=log10(i*1.0); cout<<(int)num+1<<endl; } }