An equivalent, and arguably more physically transparent, route is to work with the number of oscillation cycles the wave completes while travelling and the per-cycle amplitude decay factor, instead of the distance-attenuation formula directly.
First find the travel time from source to the 10 km observation point:
\[ t = \frac{x}{v} = \frac{10\ \text{km}}{5\ \text{km/s}} = 2\ \text{s} \]The number of complete oscillation cycles the P-wave undergoes in this travel time is:
\[ N = f \times t = 20\ \text{Hz} \times 2\ \text{s} = 40\ \text{cycles} \]The quality factor \(Q\) is defined through the fractional energy loss per radian of phase (per cycle, energy decays as \(e^{-2\pi/Q}\) per cycle, and since amplitude goes as the square root of energy, amplitude decays as \(e^{-\pi/Q}\) per cycle). Over \(N\) cycles, the total amplitude decay is:
\[ \frac{A}{A_0} = \left(e^{-\pi/Q}\right)^{N} = e^{-\pi N/Q} = e^{-\pi \times 40/80} = e^{-\pi/2} = e^{-1.5708} = 0.2079 \]which is identical to \(\pi f x/(Qv)\) since \(N = ft = fx/v\) -- confirming the two approaches agree. As a percentage this is 20.8%, safely inside the official 20-21% band.
\(\boxed{\dfrac{A}{A_0} \approx 20.8\%}\)