If you do it like 36^5 * 10
, that means "take the first five positions and put some random letters/digits there and fill the sixth (and only the sixth) position with a digit" - but your digit can be in each place.
Consider the following: If you set 5 places with letters/digits, then putting a digit in the sixth place yields 10 possibilities (the sixth position can then hold every number from 0 to 9), and if you put the digit in front of the letters, this would yield another 10 possibilities (then, the first place could contain every digit from 0 to 9), so by multipliing by 10 you forget some possibilities.
If you want to calculate it "the raw way", you could do the following (I do it with six places, you can adapt it to 7 or 8). Since a password must contain at least one digit, it can hold 1, 2, 3, 4, 5 or 6 digits, resp 5, 4, 3, 2, 1 or 0 letters.
If you have k
digits in 6 places in total, there are 6 over k
possibilities to choose these k
places. Each of these k
places can be filled with a digit, so you have 10^k
possibilities for the digits and 26^(6-k)
possibilities for letters.
So, for k
digits, you have 10^k * 26^(6-k)
possibilities. Thus, since you can distribute the k
digits in 6 over k
ways, you have
sum(k from 1 to 5: (6 over k) * 10^k * 26^(6-k)) = 36^6-26^6
possibilities in total.