0 _ _

For a three digit number, hundreds digit can have only 9 possible values (1-9) because if hundreds digit is zero then the number is not a 3 digit number.

Case I. Hundreds digit and units digit are same

9 possible values for hundreds digit, the same number has to be at units place. Except the number at hundreds place and zero, tens digit can have 8 possible values. Possible number of permutations = 9*8*1 = 72

Case II. Hundreds digit and tens digit are same

9 possible values for hundreds digit, the same number has to be at tens place. Except the number at hundreds place and zero, units digit can have 8 possible values. Possible number of permutations = 9*1*8 = 72

Case III. Units digit and Tens digit are same

9 possible values for hundreds digit. Since the number at tens (or units) place is different than the number at hundreds digit (otherwise all three numbers will be equal) and since we can't include zero, tens (or units) place will also have 8 possible values for this case. Possible number of permutations will be = 9*8*1 = 72

Adding all the possible permutations we'll get 216 possible numbers.

------ --------- ----------- ---------- --------- -------

I also write the following python code for this problem - it returns 216 elements.

result_numbers = []

counter_=0

for n in range(100, 1000):

ns = list(str(n))

if '0' not in ns:

if ns[0]==ns[1] or ns[1]==ns[2] or ns[0]==ns[2]:

if ns[0]==ns[1] and ns[1]==ns[2]:

counter_ +=0

else:

counter_ +=1

result_numbers.append(n)

print ("counter={}".format(counter_))

print (result_numbers)