The last digit of the product will be 1,2,3,4,5,6,7,8 or 9 if and only if each of the n positive integers ends in any of these digits.
Now the probability of an integer ending in 1,2,3,4,5,6,7,8 or 9 is 108.
Therefore the probability that the last digit of the product of n integers in 1,2,3,4,6,7,8 or 9 is (54)n. The probability for an integer to end in 1,3,7 or 9 is 104=52.
Therefore the probability for the product of n positive integers to end in 1,3,7 or 9 is (52)n. =(54)n−(52)n=5n4n−2n