Number of passwords with requirements

51 Views Asked by At

For a password of 8 length with at least 2 uppercase, 2 numbers, and the rest either plus lowercase, where we can have repeats, how many passwords can I generate if I have "9" "0" "X" "x" "y' in my password already?

I would think something along the lines of: Let's say we have the password as NNUUAAAA where N is a number, U is uppercase and A is all. I can view it as 90XUxyAA. Then I would have $$26 \cdot 62^2$$ possibilities. But I also have to see the number of permutations for my "word" NNUUAAAA, which I see as 8!/(2!2!4!). The answer is 420 anagrams possible. Then my answer would be $$420 \cdot 26 \cdot 62^2. $$

Is this correct?