Source Code
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;cin>>n;
    while(n--){
        int a,b,cnt=0;
        cin>>a>>b;
        if(b<2||a<2)cout<<0<<endl;
        else{
            while(b){
                b/=2;
                cnt++;
            }
            cout<<cnt<<endl;
        }
    }
}
Copy
Ramadan Candies sharlok not active_74
GNU G++17
34 ms
292 KB
Wrong Answer