A block $A$ of mass $10 \mathrm{~kg}$, connected to another hollow block $B$ of same size and negligible mass, by a spring of spring constant $500 \mathrm{~N} / \mathrm{m}$, floats in water as shown in Fig. 8.36. The compression in the spring is $\left(\rho_{\text {water }}=1 \times 10^{3} \mathrm{~kg} / \mathrm{m}^{3}, g=10 \mathrm{~m} / \mathrm{s}^{2}\right)$
(A) $10 \mathrm{~cm}$
(B) $20 \mathrm{~cm}$
(C) $50 \mathrm{~cm}$
(D) $100 \mathrm{~cm}$