I agree with guest because for a number to be divisible by 9, the sum of its digits must be divisible by 9.
All numbers smaller than 10,000 has either 1, 2, 3, or 4 digits.
The only 1-digit number that contains only 1s and 8s are 1 and 8; both obviously fail.
The only 2-digit numbers are 11, 18, 81, and 88, giving us 18 and 81.
If they have more than two digits, we may want to use the "divisble by 9" rule.
The three-digit numbers have either:
3 1s and no 8s: 1 + 1 + 1 = 3, not divisble by 9
2 1's and 1 8: 1 + 1 + 8 = 10, not divisible by 9
1 1 and 2 8's: 1 + 8 + 8 = 17, not divisible by 9
no 1s and 3 8s: 8 + 8 + 8 = 24, not divisible by 9
The four-digit number have either:
4 1s and no 8s: 1 + 1 + 1 + 1 = 4, not divisble by 9
3 1s and 1 8: 1 + 1 + 1 + 8 = 11, not divisible by 9
2 1s and 2 8s: 1 + 1 + 8 + 8 = 18, divisible by 9: 1188, 1818, 1881, 8118, 8181, 8811
1 1 and 3 8s: 1 + 8 + 8 + 8 = 25, not divisible by 9
no 1s and 4 8s: 8 + 8 + 8 + 8 = 32, not divisible by 9