Answer:
512.
Explanation:
First there is 111, 222 ...... 888.
There are 8 of these.
Then there are the number of ways you can arrange numbers when 2 of them are the same
= 8P3/2
= 168
Finally if all numbers are different the number of ways
= 8P3 = 336
Answer is 8 + 168 + 336
= 512.