\[\left( 40 - \frac{1}{4} \cdot 12^{2} \right)^{3} = \left( 40 - \frac{1}{4} \cdot 144 \right)^{3} =\]
\[= (40 - 36)^{3} = 4^{3} = 64.\]