How many 3-digit numbers can be formed from the digits 5, 6, 7, 8 and 9 assuming that
(i) Repetition of the digits is allowed?
(ii) Repetition of the digits is not allowed?