Volume of wood block :
V = (n+5)(n+8)(n+14)
Number of cubes = Volume of wood block/ Volume of small cubes
Number of cubes, N = (n+5)(n+8)(n+14) ....1)
Number of cubes with on sides painted is :
n = (n+5-2)(n+8-2)(n+14-2)
n = (n+3)(n+6)(n+12)
It is given that :
n = N/2
(n+3)(n+6)(n+12) = (n+5)(n+8)(n+14)/2
Solving above equation, we get :
n = 2
Putting value of n in equation 1, we get :
N = (2+5)(2+8)(2+14)
N = 7×10×16
N = 1120 cubes
Therefore, number of cubes are 1120.
Hence, this is the required solution.