fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. ios_base::sync_with_stdio(false);
  5. cin.tie(0);
  6. cout.tie(0);
  7. int t,c=0;
  8. cin>>t;
  9. while(t--)
  10. {
  11. long long x,y=0;
  12. cin>>x;
  13. for(int i=1;i*i<=x;i++)
  14. {
  15.  
  16. if(x-y<i)
  17. break;
  18. y+=i;
  19. c++;
  20. }
  21.  
  22. }
  23. cout<<c;
  24. return 0;
  25. }
Success #stdin #stdout 0.01s 5476KB
stdin
1
1000000000


stdout
31622