An n-digit number is a positive number with exactly n digits. Nine hundred distinct n digit numbers are to be formed using only three digit 5, 7, 9. The smallest value of n for which this is possible is :

(A) 6
(B)7
(C)8
(D)9