Prime factorisation of 125 = 5 x 5 x 5. (Three 5’s as prime factor).
Numbers divisible by 125 must contain three 5’s as prime factor.
Number of ways to select x,y,z = #Ways to Select x,y,z such that product xyz contains at least three 5’s as prime factors
= #Ways of selecting 3 distinct numbers from set A – #Ways of selecting x,y,z such that product xyz contains at most two 5’s as prime factors.
Number of elements that contain one 5 as prime factor = 8 {these are 5,10,15,20,30,35,40,45} ,
Number of elements that contain two 5’s as prime factor = 2 {these are 25,50},
Number of elements that contain no 5 as prime factor = 50 – 8 – 2 = 40.
#Ways of selecting 3 distinct numbers from set A = C(50,3) = 19600.
#Ways of selecting x,y,z such that product xyz contains at most two 5’s as prime factors
= (product xyz contains no 5 as prime factor) or (product xyz contains one 5 as prime factor) or (product xyz contains two 5’s as prime factor)
Case A. product xyz contains no 5 as prime factor = C(40,3) = 19600 {select elements that don’t contain 5 as prime factor}
Case B. product xyz contains one 5 as prime factor = C(40,2) * C(8,1) = 6240 {select 2 elements that don’t contain 5 as prime factor and select one element that contains one 5 as prime factor}
Case C. product xyz contains two 5’s as prime factor: Two cases
Case I. select one element that contains two 5’s as prime factor = C(2,1) * C(40,2) = 1560
Case II. select two elements that contains one 5 as prime factor = C(8,2) * C(40,1) = 1120
C = 1560 + 1120 (disjoint cases)
= 2680.
Since case A,B and C are disjoint we can apply addition rule.
Therefore, #Ways of selecting x,y,z such that product xyz contains at most two 5’s as prime factors = A + B + C
= 9880 + 6240 + 2680 = 18800.
Number of ways to select x,y,z = 19600 – 18800 = 800.
Ans: 800.