How to find number of combinations

I need to find number of combination for word which has following constraint a. The word can have exactly 5 characters b. The word can have digits [0-9], upper case letters [A-Z]and lowercase letters [a-z] c. The word must contain exactly one uppercase letter and exactly one digit characters.

My approach

The word is comprised of 5 characters. For each character can be filled with digit [0-9], uppercase letter [A-Z] or lowercase letter [a-z]. So for the first place we have = 10 +26 +26 = 62 combinations. Similarly we have 62 combinations for each position.

Therefore total number of combinations are=62 * 62 * 62* 62 *62 =916132832

Answer = Total number of combination - combination which does not follow 3rd condition

I am not able to figure out how to calculate number of combinations which does not follow 3rd condition.

$$26$$ ways to choose the capital letter and $$5$$ choices for its place.
$$10$$ ways to choose the digit and $$4$$ places to put it.
- three equal letters: $$26$$ choices, $$1$$ way to arrange
- two equal letters: $$26 \times 25$$ choices, $$3$$ different arrangements
- all different letters: $$26 \times 25 \times 24$$ ways.
total: $$\quad26 \cdot 5 \cdot 10 \cdot 4 \cdot 26 \cdot\left( 1+25 \cdot 3+25 \cdot24 \right)=91 395 200$$
• Looks like a typo on "25" versus "26." Also note that $26^{3} = 26(1+(25)(3)+(25)(24))$. Apr 6 '19 at 1:14