Explanation:
along the side with 1 cm we can fit 3 cubes, as 3×1/3 = 1.
along the side with 2 2/3 cm we can fit 8 cubes :
2 2/3 = 6/3 + 2/3 = 8/3.
and 8/3 / 1/3 = 8/3 × 3/1 = 3×8 / 3×1 = 8
and the height is 2/3 cm, so we can put 2 layers of cubes on top of each other.
so, we have
3 × 8 × 2 = 48
48 cubes are needed to fill the prism.