jee-advanced 2025 Q10

jee-advanced · India · paper1 4 marks Permutations & Arrangements Forming Numbers with Digit Constraints
Let $S$ be the set of all seven-digit numbers that can be formed using the digits 0, 1 and 2. For example, 2210222 is in $S$, but 0210222 is NOT in $S$.
Then the number of elements $x$ in $S$ such that at least one of the digits 0 and 1 appears exactly twice in $x$, is equal to $\_\_\_\_$ .
Let $S$ be the set of all seven-digit numbers that can be formed using the digits 0, 1 and 2. For example, 2210222 is in $S$, but 0210222 is NOT in $S$.

Then the number of elements $x$ in $S$ such that at least one of the digits 0 and 1 appears exactly twice in $x$, is equal to $\_\_\_\_$ .