Solution (source code)

= Solution

The definition of $X_c$ gives
$$
\frac Q{Q_D^*}=\left(\frac{D_{\rm im}}{X_cD}\right)^3.
$$
The <cratering collision> prescription therefore removes the target-mass fraction
$$
\boxed{1-f_{\rm lr}=\frac12\frac Q{Q_D^*}
=\frac12\left(\frac{D_{\rm im}}{X_cD}\right)^3}.
$$