Number of ways to form a password of length 8 9 and 10 with restrictions 
Consider creating a password, and Its length is between $8$ and $10$ characters. Each character is either lowercase letters without accents, uppercase letters without accents, digits from 0 to 9 or the special characters !?#&@%*~$_. The password contains at least one character of at least three of the four types mentioned. In how many ways can a password be chosen to meet all those requirements?

Here is my attempt: There are $10*26*26+ 10*26*26+26*10*10+26*10*10$ ways to pick 3 characters one from three of the four types. There are $\binom{8}{3}+\binom{9}{3}+\binom{10}{3}$ to choose three positions for the length 8, 9 and 10 strings. So then:
$$(10*26*26+ 10*26*26+26*10*10+26*10*10)*\binom{8}{3}*\frac{72!}{(72-5)!}+ (10*26*26+ 10*26*26+26*10*10+26*10*10)*\binom{9}{3}*\frac{72!}{(72-6)!} +(10*26*26+ 10*26*26+26*10*10+26*10*10)*\binom{10}{3}*\frac{72!}{(72-7)!}$$
But this clearly has overlaps, so I overcounted. How can I solve this problem?

We can use subtraction to solve this problem. If we would have one character for each group only, the number of possible combinations of length $n$ would be:
$$4^n - {4 \choose 2} (2^n - 2) - {4 \choose 1} 1^n$$
This comes down to considering all possible combinations with four groups of characters, subtracting all combinations with two groups or less. We can use a similar approach when multiple characters are allowed. For the number of combinations $f(n)$ of length $n$, we find:
$$f(n) = 72^n - [(52^n - 2 \cdot 26^n) + 4 \cdot (36^n - 26^n -10^n) + (20^n - 2 \cdot 10^n)] - (2 \cdot 26^n + 2 \cdot 10^n)$$
The total number of valid passwords thus equals:
$$f(8) + f(9) + f(10) \approx 3.635 \cdot 10^{18}$$ 
