Solution (source code)

= Solution

Assume a thin <isothermal atmosphere>, so $g\simeq GM_p/R_p^2$ and the surface area are constant through it. Integrating <hydrostatic equilibrium> from base pressure $P_0$ to negligible top pressure gives atmospheric column mass $P_0/g$. Therefore
$$
\boxed{
M_{\rm atm}\simeq4\pi R_p^2\frac{P_0}{g}
=\frac{4\pi P_0R_p^4}{GM_p}}.
$$
Equivalently, $M_{\rm atm}\sim4\pi R_p^2\rho_0H$, with $\rho_0=P_0\mu m_H/(k_BT_0)$ and $H=k_BT_0/(\mu m_Hg)$; the explicit temperature dependence cancels.