Advertisement
Saleh127

CF 1419b

Sep 19th, 2020
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define test int t; cin>>t; for(int cs=1;cs<=t;cs++)
  5. int main()
  6. {
  7. ios_base::sync_with_stdio(0);
  8. cin.tie(0);cout.tie(0);
  9.  
  10.  
  11. test
  12. {
  13. ll a,c,e,f=0,i,j,k,l;
  14.  
  15. cin>>a;
  16. f=k=l=0;
  17. while(l<=a)
  18. {
  19. k+=k+1;
  20. l+=(k*(k+1))/2;
  21. if(l<=a) f++;
  22. }
  23. cout<<f<<endl;
  24. }
  25.  
  26.  
  27. return 0;
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement