fork download
  1. #include <cstdio>
  2. using namespace std;
  3.  
  4. int main() {
  5. int T;
  6. scanf("%d", &T);
  7. while (T--) {
  8. long long n;
  9. scanf("%lld", &n);
  10. int k = 1;
  11. while ((k + 1) * (1LL << (k + 1)) - 1 < n) {
  12. k++;
  13. }
  14. printf("%d\n", k);
  15. }
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5280KB
stdin
1
3
stdout
1