The number of all positive integers up to with non-repeating digits is
The number of all positive integers up to with non-repeating digits is
Entered answer:
Solution
The number of all positive integers up to with non-repeating digits is
A number has non-repeating digits if no digit appears more than once. For example, 123 has non-repeating digits while 122 has repeating digits (the digit 2 appears twice).
Since we want numbers up to 500, we need to consider 1-digit, 2-digit, and 3-digit numbers separately. Each category has different constraints for the digits we can choose.
1-digit numbers
The 1-digit positive integers are: 1, 2, 3, 4, 5, 6, 7, 8, 9
Since each number has only one digit, there's no way for digits to repeat. Every single 1-digit number automatically satisfies our condition.
Count for 1-digit numbers: 9
2-digit numbers
A 2-digit number has the form where is the tens digit and is the units digit.
For non-repeating digits: (the two digits must be different)
Choose the tens digit :
can be any digit from 1 to 9. It has 9 choices
cannot be 0, otherwise it wouldn't be a 2-digit number (it would be a 1-digit number)
Choose the units digit :
can be any digit from 0 to 9, except it cannot equal
We have 10 total digits (0,1,2,3,4,5,6,7,8,9), but since already used one digit, has 9 remaining choices
Example: If , then can be any of {0,1,2,4,5,6,7,8,9} - that's 9 choices.
Total 2-digit numbers:
3-digit numbers
A 3-digit number has the form . Since we want numbers , the hundreds digit can only be 1, 2, 3, or 4.
Choose the hundreds digit :
can be 1, 2, 3, or 4
So has 4 choices
Choose the tens digit :
can be any digit from 0 to 9, except it cannot equal
Since used one digit, has 9 remaining choices
Choose the units digit :
can be any digit from 0 to 9, except it cannot equal or
Since and already used two different digits, has 8 remaining choices
Total 3-digit numbers:
Adding all cases together:
1-digit numbers: 9
2-digit numbers: 81
3-digit numbers: 288
Total:
Related questions:
CAT 2022 Slot 2
CAT 2019 Slot 1