You can quite easily do it in O(n) with n units of storage.
First you should see that for example to check whether 100 is the sum of three perfect cubes, it is totally pointless to compute any of the cubes from 5^3 = 125 to 101^3, since adding two more cubes well give a result much bigger than 100. The number of iterations for each loop would be $n^{1/3}$, and the total iterations for three nested loops would be n. You examine n numbers, so that simple change gets you to $n^2$. You could have a lookup table that tells you if x is a cube and use that to determine whether a k exists, that would get you down to $n^{5/3}$ operations.
Instead realise that for every “num” you do mostly the same calculation and that is pointless. And we can assume that i <= j <= k since the order doesn’t matter. We must have 3i^3 <= n, then i^3 + 2j^2 = 02j^3 <+ n, then i^3 +j^2+j^3 2 + j^3 <= n. So to check:
Create an array “isCube” containing indices 1 to n and fill them all with a value “false”.
Loop for I from 1 until 3i^3 > n.
Loop for j from I until i^3+2j^3 > n
Loop for k from j until i^3 + j^3+kY3j^3+k^3 <=> 1999nn
Set element i^3 + j^3 + k^3 to true.
Print all numbers if a bit in your array is set.