If $n$ positive integers taken at random are multiplied together, show that the probability that the last digit of their product is 5 is $$\frac{5^n-4^n}{{10}^n}$$
My attempt:
Let $n$ positive integers be $x_1,x_2, \cdots ,x_n$. Let $a=x_1 \cdot x_2 \cdots x_n$. Let $S$ be the sample set. Then $n(S)=10^n$ since there are 10 possibilities for unit digit of each integer. I couldn't proceed from there. Please help me in this regard. Thanks.