fork download
  1. #include <iostream>
  2. using namespace std;
  3. long F(long n) {
  4. return n * n * n;
  5. }
  6. int main()
  7. {
  8. long k, i;
  9. cin >> k;
  10. i = 12;
  11. while (i>0 && F(i)>k)
  12. i--;
  13. cout << i;
  14. return 0;
  15. }
Success #stdin #stdout 0s 15232KB
stdin
8
stdout
2