#include<vector> #include<iostream> #include <cmath> using namespace std; int main(){ int t; long long n; cin>>t; while(t--){ cin>>n; if(n <= 3) cout<<n<<endl; else { long k = static_cast<long>(log(n) / log(2) + 1); if(pow(2,k-1) < n) k++; cout << k << endl; } } return 0; } 手写了几个数据,然后可以看出2^(l) < n <= 2^(h)的.做一下变化就好了😅