We know
C is not zero (leading zeroes are generally frowned on).
E is not zero (we multiply by E on the right side).
The cube must be between 11^3 and 21^3 to be a four digit number not ending in 0, and can't be 20^3. That leaves 10 possibilities.
The cube must have all four digits distinct.
That rules out 11^3 (which starts and ends with 1), leaving 9 possibilities.
Some mental multiplication gives possibilities for those 9:
(12) 1728, (13) 2197, (14) 2744, (15) 3375, (16) 4096, (17) 4913, (18) 5832, (19) 6859, (21) 9261.
We rule out two of those nine for repetition of digits.
That cuts it to 7, giving us 7 choices for CUBE.
Now ...
We know we multiply by E to get CUBE, so CUBE must have E as one of its factors.
That rules out 2197, 4096, 4913, 6859.
We're down to just 1728, 5832, and 9261 as choices for CUBE.
So now we look at those.
9261 = (N-2+M-6+1+R) x (S+Q+2+A-R) x 1 // left to assign: 0,3,4,5,7,8
the max N+M+R can be is 5+7+8=20 so the first term can be at most 13.
there's no way the second term can be large enough to make the equation true. Eliminated.
5832 = (N-8+M-3+2+R) x (S+Q+8+A-R) x 2 // left to assign: 0,1,4,6,7,9
the max N+M+R can be is 6+7+9=22 so the first term can be at most 13.
there's no way the second term can be large enough to make the equation true. Eliminated.
Which leaves
1728 = (N-7+M-2+8+R) x (S+Q+7+A-R) x 8 // left to assign: 0,3,4,5,6,9
The x 8 means the other two terms only need to reach a product of 216.
N+M+R can be between 0+3+4=7 and 5+6+9=20 so the first term could be between 6 and 19.
S+Q+A-R similarly can be between 0+3+4-9=-2 and 5+6+9-0=20 so 2nd term is between 5 and 25.
216 has factors of 6,8,9,12,18,24 in those ranges, and 216 = 12 x 18.
From that we can do some directed guessing ...
12x18 seems like a good place to look.
First term of 18 means N+M+R=19 so 4,6,9 is the only triplet that works.
That leaves 12 and S,Q,A of 0,3,5, with S+Q+A-R=5.
This would require R=3 which doesn't work.
Flip it?
First term of 12 means N+M+R=13 so 0,4,9 or 3,4,6 are possible triplets.
Second term of 18 means S+Q+A-R=11.
For N,M,R from 0,4,9 we'd have 3,5,6 for S,Q,A; S+Q+A-R=11 requires R=3, doesn't work.
For N,M,R from 3,4,6 we'd have 0,5,9 for S,Q,A; S+Q+A-R=11 requires R=3, so let's go with that.
Now we can fill in what we know.
C=1, U=7, B=2, E=8, R=3, (S,Q,A) are from (0,5,9), (N,M) are from (4,6).
At this point,
if there's any way to distinguish between S,Q,A or N,M, I don't see it.
So there are 12 valid solutions:
C=1, U=7, B=2, E=8, R=3, S=0, Q=5, A=9, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=0, Q=9, A=5, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=5, Q=0, A=9, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=5, Q=9, A=0, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=9, Q=0, A=5, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=9, Q=5, A=0, N=4, M=6
C=1, U=7, B=2, E=8, R=3, S=0, Q=5, A=9, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=0, Q=9, A=5, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=5, Q=0, A=9, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=5, Q=9, A=0, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=9, Q=0, A=5, N=6, M=4
C=1, U=7, B=2, E=8, R=3, S=9, Q=5, A=0, N=6, M=4
(CUBE) = (N - U + M - B + E + R ) x (( S + Q + U + A - R )x E))
1728 = ((N+M=10)-7-2+8+3) x (S+Q+A=14)+7-3) x 8 = 12 x 18 x 8 ... yup.
Note, too, that we did this analysis for the factorization of 216=12x18.
We didn't look at 216=9x24, which gives still more valid solutions.
I had really hoped there'd be a unique solution.