How many numbers are there between 1 and 100 such that at least one of their digits is 5?
19
20
21
23
29
The number of numbers having at least one 5 in its digits is 19.
How many numbers are there between 100 and 1000 such that every digit is either 2 or 9?
How many numbers are there between 1 and 1000 with their sum of digits ≤ 5?