A cube will have 3 parts. Let us take an example to find 104

Part I -> 104 is 4 more than 100, so add thrice of this 4 i.e. 12 to 100 to get

part II -> multiply that 12 we got in I part to 4 (the more part from 100) to get

part III -> cube of 4 (the more part of 100) to get

Append three parts to get 112 48 64 i.e.

Note : Part II and III must contain only 2 digits since there are 2 zeros in 100.

Let us take another example : 108

Part I -> 8 more than 100, so add 3*8 to 100 to get

Part II -> 24*8 = 192

Part III -> 8

So 108

So add 5 of 512 to 192 to get 197.

Then add 1 of 197 to 124 to get 125.

So 108

Let us take another example : 101

Part I -> 1 more than 100, so add 3*1 to 100 to get 103.

Part II -> 3*1 = 3, but we require 2 digits so it becomes

Part III -> 1

So 101

Similarly we can do this for base 1000, but now part II and III contains 3 digits.

Let us take an example : 1004

Part I -> 4 more than 1000, so add 3*4 to 1000 to get

Part II -> 12*4 = 48 =

Part III -> 4

So 1004