Solved another one.
Not the first attempt, actually. At first I generated cubes and checked
how many of the permutations were also cubes, but that's far too
inefficient, because the number of permutations is factorial of the
digit count. So checking whether cubes are permutations is a much
more efficient way to go.