log10
#include <algorithm> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <vector> #include <sstream> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #define REP(i, n) for(int i=0; i<(int)n; ++i) #define FOR(i, c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i) #define ALL(c) (c).begin(),(c).end() #define each(i, c) FOR(i, c) #define VAR(a) cout << #a << " : " << a << endl; typedef long long int lli; using namespace std; int main(int argc, char *argv[]) { int tc; cin >> tc; while (tc--) { int n; cin >> n; double sum = 0; for (int i = 0; i < (int)n; ++i) { sum += log10(i + 1); } cout << (int)sum + 1 << endl; } return 0; }