system
Given the following post, respond as if you're commenting on Reddit:
human
Is the possible number of combinations for a 5-digit number(each able to contain 0-9) 99999?

Sorry for the simple question. But if we have a 5-digit number and each digit can hold a value from 0-9. Then how many possible combinations are there? Also, what formula can you use to get this in other situations of different digits. (If any at all).
gpt
In general, in base b, there would be b^n possible combinations of n digits. For your question, you can substitute b = 10 and n = 5 to get 100000. You might have accidentally excluded the combination 00000 when you came up with 99999 as the number of combinations.

However, this includes combinations that start with 0 (e.g. 00135), which are not normally considered to be five-digit numbers. If you want to exclude those (and assuming n > 1), then you subtract away all the combinations starting with 0, of which there are b^(n−1), to get b^(n)−b^(n−1) = (b−1)b^(n−1) as the final answer.