the no can have either one 8 ,two 8 or three 8 case 1: three 8 888 1 way case 2: two 8 3C2*9 3C2 for selecting 2 place for 8 and 9 values to fill third place (excluding 8) case 3:one eight 3C1*9*9 3C1 for selecting 1 place for 8 and 9 values to fill other place (excluding 8) Total= 1+3C2*9 + 3C1*9*9 =271
This is the general solution and can be extended further