#include<iostream> #include<cstring> using namespace std; int v; int n=1; int count=1; int main(){ cin>>v; v=v-1; while(v>=count*2){ n++; count*=2; v-=count; } if(v==0){ cout<<n<<endl; } else cout<<n+1<<endl; return 0; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account