A cruel and fickle kingAlgebra Level 4
Moments after the final cube was placed, the king changed his mind. He ordered the pyramid to be taken down, and in its place, a cubic monolith was to be built. He ordered the monolith to be built as large as possible with the same stone slabs the pyramid was made of.
The king decided that he would tolerate no waste, and so he ordered one of his subjects to be sacrificed for each leftover slab of stone.
How many of the king's subjects will be sacrificed?