Since 31z5 is a multiple of 3.
∴ The sum of the digits (3 + 1 + z + 5) is a multiple of 3.
So, 9 + z is one of these numbers 0, 3, 6, 9, 12, …..
When, 9 + z = 0 ⇒ z = – 9 (Negative)
When, 9 + z = 3 ⇒ z = 3 – 9 = -6 (Negative)
When, 9 + z = 6 ⇒ z = 6 – 9 = -3 (Negative)
When, 9 + z = 9 ⇒ z = 0
When, 9 + z = 12 ⇒ z = 3
When, 9 + z = 15 ⇒ z = 6
When, 9 + z = 18 ⇒ z = 9
When, 9 + z = 21 ⇒ z = 12 (Not Possible)
∴ The values of z are 0, 3, 6 or 9.
[∵ Negative values of z are not possible, and z is a digit.]