fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. unsigned long long n;
  6. cin >> n;
  7.  
  8. unsigned long long N = 0, bloques = 0;
  9.  
  10. for(int i = 1; i < 100; i++){
  11. bloques += i;
  12. if(bloques > n){
  13. break;
  14. }
  15. N++;
  16. }
  17.  
  18. cout << N << "\n";
  19.  
  20. return 0;
  21.  
  22. }
Success #stdin #stdout 0.01s 5288KB
stdin
25
stdout
6