Skip to main contentSkip to solution

The number of all positive integers up to 500500 with non-repeating digits is

Entered answer:

Solution

✅ Correct Answer: 378

The number of all positive integers up to 500500 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 ABAB where AA is the tens digit and BB is the units digit.

For non-repeating digits: A≠BA \neq B (the two digits must be different)

Choose the tens digit (A)(A):

AA can be any digit from 1 to 9. It has 9 choices

AA cannot be 0, otherwise it wouldn't be a 2-digit number (it would be a 1-digit number)

Choose the units digit (B)(B):

BB can be any digit from 0 to 9, except it cannot equal AA

We have 10 total digits (0,1,2,3,4,5,6,7,8,9), but since AA already used one digit, BB has 9 remaining choices

Example: If A=3A = 3, then BB can be any of {0,1,2,4,5,6,7,8,9} - that's 9 choices.

Total 2-digit numbers: 9×9=819 \times 9 = 81


3-digit numbers

A 3-digit number has the form ABCABC. Since we want numbers ≤500\leq 500, the hundreds digit AA can only be 1, 2, 3, or 4.

Choose the hundreds digit (A)(A):

AA can be 1, 2, 3, or 4

So AA has 4 choices

Choose the tens digit (B)(B):

BB can be any digit from 0 to 9, except it cannot equal AA

Since AA used one digit, BB has 9 remaining choices

Choose the units digit (C)(C):

CC can be any digit from 0 to 9, except it cannot equal AA or BB

Since AA and BB already used two different digits, CC has 8 remaining choices

Total 3-digit numbers: 4×9×8=2884 \times 9 \times 8 = 288


Adding all cases together:

1-digit numbers: 9

2-digit numbers: 81

3-digit numbers: 288

Total: 9+81+288=3789 + 81 + 288 = 378

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question