Rolling $4$ dice and multiplying the results. What is the probability that the product is divisible by $5$ or has $5$ as the least significant digit? Four fair dice are rolled and the four numbers shown are multiplied together. What is the probability that this product
(a) Is divisible by $5$?
(b) Has last digit $5$?
MY ATTEMPT
a) A number is divisible by $5$ if and only if it has at least one factor equal to $5$. Let us denote by $F$ the event "it occurs at least one number five". Hence the sought probability is given by
\begin{align*}
\textbf{P}(F) = 1 - \textbf{P}(F^{c}) = 1 - \frac{5^{4}}{6^{4}} = 1 - \left(\frac{5}{6}\right)^{4}
\end{align*}
b) Here is the problem. I am not able to describe properly the target results.
Am I on the right track? Can someone please help me to solve it? Any help is appreciated.
 A: As others have noted, for part (b) you can first show that:

the product has last digit $5$ if and only if all the numbers are odd and there is at least one $5$.

From there, I would proceed like this (just slightly simpler than pwerth and José Carlos Santos's approaches):
\begin{align*}
P(\text{all odd AND at least one 5})
&= P(\text{all odd}) - P(\text{all odd and no 5}).
\end{align*}
So, what is the probability that all dice are odd? And what is the probability all are odd and there is no $5$ (i.e., all dice are $1$ or $3$)?
A: a) looks good.
b) Hint: A number ends in $5$ if it both


*

*is divisible by $5$

*is odd (i.e. not divisible by $2$)

A: Your answer for part $(a)$ is correct. For part $(b)$, observe that a number $N$ has last digit $5$ iff it's divisible by $5$ and odd. This means that if we denote our rolls by $a,b,c,d$ then $N=abcd$ where at least one of $a,b,c,d$ is a $5$ and none of $a,b,c,d$ is even. This means we have to avoid $2,4,6$ on all rolls, as well as obtain at least one $5$. 


*

*Case 1: Exactly one $5$. Choose one of $4$ positions for the $5$ and fill in the remaining three spots with either $1$ or $3$. This can be done in $\binom{4}{1}\cdot 2^{3}$ ways.

*Case 2: Exactly two $5$s. Choose two of $4$ positions for the $5$s and fill in the remaining two spots with either $1$ or $3$. This can be done in $\binom{4}{2}\cdot 2^{2}$ ways.

*Case 3: Exactly three $5$s. Choose three of $4$ positions for the $5$s and fill in the remaining spot with either $1$ or $3$. This can be done in $\binom{4}{3}\cdot 2^{1}$ ways.

*Case 4: All $5$s. There is only one way to do this.


The number of desirable outcomes is therefore
$$\binom{4}{1}\cdot 2^{3}+\binom{4}{2}\cdot 2^{2}+\binom{4}{3}\cdot 2+ 1$$
and since there are $6^{4}$ total outcomes, the desired probability is
$$\frac{\binom{4}{1}\cdot 2^{3}+\binom{4}{2}\cdot 2^{2}+\binom{4}{3}\cdot 2+ 1}{6^{4}}$$
A: Your answer to the first question is correct.
Concerning the other question, note that the last digit will be $5$ if and only if there is at least one $5$ and, besides, all others are odd. So, the answer is the sum of $4$ numbers:


*

*the odds that there's exactly one five and the others are odd numbers: $\displaystyle4\times\frac16\times\left(\frac13\right)^3$;

*the odds that there are exactly two fives and the others are odd numbers: $\displaystyle6\times\left(\frac16\right)^2\times\left(\frac13\right)^2$;

*the odds that there are exactly three fives and the other is an odd number: $\displaystyle4\times\left(\frac16\right)^3\times\frac13$;

*the odds that there are four fives: $\displaystyle\left(\frac16\right)^4$.

