The potential energy U of a body of mass m at a height h above some reference point is given as U=mgh –(1)

Where g is the acceleration due to gravity. Initially, n cubes with mass m and edge length L are placed on the ground. The system will be defined as the collection of all of these components. In this question, we’ll use the ground as a reference point. A block’s centre of mass will be at its centre. Half of the edge length will be the height of the centre of mass above the ground.

Work done =Δ(P.E)

Initial P.E. = n × m × g × L/2

Final P.E. = n × m × g × nL/2

Work done =Δ(P.E.) =nmgL/2(n−1)