5. There are five different goods with the same price. Starting from today, each will be discounted by $10\%$ or $20\%$ every day. After several days, the prices of these five goods are all different. Let the ratio of the highest price to the lowest price be $r$. Then the minimum value of $r$ is ( ).
(A) $\left(\frac{9}{8}\right)^{3}$
(B) $\left(\frac{9}{8}\right)^{4}$
(C) $\left(\frac{9}{8}\right)^{5}$
(D) $\frac{9}{8}$
5.B.

It is easy to know that after 4 days, the prices of the five goods can be all different.

Let the price of the five goods before the discount be $a$, and after $n$ days. The price of each good after $n$ days can certainly be expressed as
$$
\begin{array}{l}
a(1-10 \%)^{k}(1-20 \%)^{n-k} \\
=a\left(\frac{9}{10}\right)^{k}\left(\frac{8}{10}\right)^{n-k},
\end{array}
$$

where $k$ is a natural number, and $0 \leqslant k \leqslant n$.
To make the value of $r$ the smallest, the prices of the five goods should be respectively
$$
\begin{array}{l}
a\left(\frac{9}{10}\right)^{i}\left(\frac{8}{10}\right)^{n-i}, a\left(\frac{9}{10}\right)^{i+1}\left(\frac{8}{10}\right)^{n-i-1}, \\
a\left(\frac{9}{10}\right)^{i+2}\left(\frac{8}{10}\right)^{n-i-2}, a\left(\frac{9}{10}\right)^{i+3}\left(\frac{8}{10}\right)^{n-i-3}, \\
a\left(\frac{9}{10}\right)^{i+4}\left(\frac{8}{10}\right)^{n-i-4},
\end{array}
$$

where $i$ is a natural number not exceeding $n$.
Therefore, the minimum value of $r$ is
$$
\frac{a\left(\frac{9}{10}\right)^{i+4}\left(\frac{8}{10}\right)^{n-i-4}}{a\left(\frac{9}{10}\right)^{i}\left(\frac{8}{10}\right)^{n-i}}=\left(\frac{9}{8}\right)^{4} .
$$