fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. uint64_t x;
  6. cin >> x;
  7. uint64_t a=1, b=1;
  8. int i = 1;
  9. while (x) {
  10. if (i*i <= i*i*i) {
  11. if (x == i) {
  12. cout << i*i;
  13. return 0;
  14. }
  15. i++;
  16. } else {
  17. if (x == i) {
  18. cout << i*i*i;
  19. return 0;
  20. }
  21. i++;
  22. }
  23. x--;
  24. }
  25. cout << "Cx not found";
  26. return 0;
  27. }
Success #stdin #stdout 0.01s 5516KB
stdin
10
stdout
Cx not found