How many positive integers less than 10^20 have all their digits the same?

9 1-digit

9 2-digits
...
9 20-digits
Looks like 180

To find the number of positive integers less than 10^20 that have all their digits the same, we need to consider the possible values for the repeated digit.

Since all the digits are the same, we can have the repeated digit 1, 2, 3, ..., 9 as the only digit in the number. We cannot have 0 as the repeated digit because that would make the number not positive.

Let's consider each possible repeated digit one by one:

1. If the repeated digit is 1, we can have a total of 10 numbers: 1, 11, 111, 1111, ..., 111,111,111,111,111,111.

2. If the repeated digit is 2, we can have a total of 10 numbers: 2, 22, 222, 2222, ..., 222,222,222,222,222,222.

3. Similarly, for the repeated digits 3 to 9, we can have a total of 10 numbers each.

Therefore, the total number of positive integers less than 10^20 that have all their digits the same is 10 times 9.
So, the answer is 10 * 9 = 90.