I solved the following problem, but not sure if I did it right:
"One country has $5$-digit license plates for cars but with condition that there are not more than one pair of consecutive identical digits. So, license plate $22343$ is fine, but $78855$, $12333$, $11111$ are not. How many license plates can be in this country? License plates can start with $0$'s"
My approach was to sum number of plates with all different digits and number of plates with one pair of consecutive identical digits.
So number of plates with all different digits is
$10\cdot 9\cdot 8\cdot 7\cdot 6 = 30240$
When we have one pair of consecutive identical digits, it can be placed on one of four positions:
XX _ _ _
_ XX _ _
_ _ XX _
_ _ _ XX
And for each option we have $10\cdot 9\cdot 9\cdot9 = 7290$ license plates.
So the final answer is $30240 + 7290\cdot 4 = 59400$
I'm not sure if it's correct and want to check.