Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- #include<string>
- #include <cmath>
- using namespace std;
- int main()
- {
- uint64_t x;
- cin >> x;
- uint64_t i = 1, j = 1, a = 1, b = 1;
- uint64_t res = 0;
- while (x)
- {
- if (a <= b)
- {
- x += a == b;
- res = a;
- i += 1;
- a = i*i;
- }
- else
- {
- res = b;
- j += 1;
- b = j*j*j;
- }
- x -= 1;
- }
- cout << res;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement