#include<bits/stdc++.h>
#define pb push_back
#define all(v) v.begin(),v.end()
#define vl vector<int>
#define in(a) for(auto &x : a) cin>>x;
#define out(a) for(auto &x : a) cout<<x<<" "
#define pr(a) cout<<a<<endl
#define N (int)(1e5 + 10) ///100010
#define nl "\n"
#define mod 1000000007
#define pr(x) cout<<x<<"\n"
#define sz(x) ((int) x.size())
#define test int T; cin>>T; while(T--)
#define yes cout<<"Yes"<<endl;
#define no cout<<"No"<<endl;
#define lcm(a,b) (a*(b/__gcd(a,b)))
typedef long long ll;
typedef long double ld;
typedef long long int lli;
using namespace std;
vector<int> graph[N];
bool visited[N];
ll x;
//binary search using recursion
void bs(int l, int h, int arr[], int n)
{
if(l<=h)
{
int m = (l+h)/2;
if(n<m) bs(m+1, h, arr, n);
else if(n>m) bs(l, m-1, arr, n);
else x = m; ///return Answer
}
}
//Basic DFS
void dfs(int vertex)
{
// if(visited[vertex]) return;
visited[vertex] = true;
for(auto child : graph[vertex])
{
if(visited[child]) continue;
dfs(child);
}
}
void solve()
{
ll n;
cin>>n;
ll i = 1, ans, sum = 0;
while(1)
{
ll x = pow(2,i) - 1;
sum+=(x*(x+1))/2;
if(sum>n) break;
ans = i;
i++;
}
cout<<ans<<endl;
}
int main()
{
// ios_base::sync_with_stdio(0);cin.tie(0);
ll t;
cin>>t;
while(t--) solve();
}
Two Strings | Anagrams |
Prime Number | Lexical Sorting Reloaded |
1514A - Perfectly Imperfect Array | 580A- Kefa and First Steps |
1472B- Fair Division | 996A - Hit the Lottery |
MSNSADM1 Football | MATCHES Playing with Matches |
HRDSEQ Hard Sequence | DRCHEF Doctor Chef |
559. Maximum Depth of N-ary Tree | 821. Shortest Distance to a Character |
1441. Build an Array With Stack Operations | 1356. Sort Integers by The Number of 1 Bits |
922. Sort Array By Parity II | 344. Reverse String |
1047. Remove All Adjacent Duplicates In String | 977. Squares of a Sorted Array |
852. Peak Index in a Mountain Array | 461. Hamming Distance |
1748. Sum of Unique Elements | 897. Increasing Order Search Tree |
905. Sort Array By Parity | 1351. Count Negative Numbers in a Sorted Matrix |
617. Merge Two Binary Trees | 1450. Number of Students Doing Homework at a Given Time |
700. Search in a Binary Search Tree | 590. N-ary Tree Postorder Traversal |