题解——CF Manthan, Codefest 18 (rated, Div. 1 + Div. 2) T1(找规律)
就是找一下规律
但是奈何昨天晚上脑子抽
推错了一项QwQ
然后重新一想
A掉了QwQ
#include <cstdio> #include <algorithm> #include <cstring> #include <cmath> using namespace std; int main(){ int n; scanf("%d",&n); int i=1,ans=1,now=1; while(i<n){ i+=now*2; now*=2; ans++; } printf("%d",ans); return 0; }