3. Toss a coin 5 times, the probability of getting exactly one head is not 0, and is the same as the probability of getting exactly two heads. Then the probability of getting exactly three heads is $\qquad$

Throw a coin 5 times, the probability of getting exactly one head is not 0, and is the same as the probability of getting exactly two heads. Then the probability of getting exactly three heads is $\qquad$
3. $\frac{40}{243}$.

Let the probability of getting heads in each coin toss be $p$. Then the probability of getting exactly $k$ heads in five tosses is
$$
\mathrm{C}_{5}^{k} p^{k}(1-p)^{5-k}(k=0,1, \cdots, 5) \text {. }
$$

From the problem, we know
$$
\mathrm{C}_{5}^{2} p^{2}(1-p)^{3}=\mathrm{C}_{5}^{1} p(1-p)^{4}(0<p<1) \text {. }
$$

Solving this, we get $p=\frac{1}{3}$.
Therefore, the probability of getting exactly three heads is
$$
C_{5}^{3}\left(\frac{1}{3}\right)^{3}\left(1-\frac{1}{3}\right)^{2}=\frac{40}{243} \text {. }
$$