A new December and a new bunch of puzzles from mscroggs.co.uk.

n = 99999…999
= 1055 – 1
n3 = (1055 – 1)3
= (1055)3 + 3*(1055)2*(-1) + 3*(1055)*(-1)2 + (-1)3
= 10165 – 3*10110 + 3*1055 – 1
10000...0000...0000...000
- 300...0000...000
+ 300...000
- 1
==========================
9999...9700...0299...999
So now we just have to count the 9s and 7s and the 2.
The 1 lives in position 1. The 3 above it has a 3 in position 56. The next 3 is in position 111. Finally the 1 above it is in position 166.
The result of adding and subtracting is 9s from position 1 to 55, a 2 at position 56, then some 0s, a 7 at position 111 and finally 9s from position 112 to 165. 55*9+2+7+54*9 = 990. Which happens to be 55*18.
Just to test my logic here: if n had been 9999 (4 digits), n3 would be 999,700,029,999. 4*9+2+7+3*9 = 72 = 4*18. Checks out.