Learn / Library / Brainteasers
All digits different
A -hour digital clock displays the time as digits , with leading zeros, for every second from to , which is displays. For how many of these displays are all digits different from each other?
Checking an answer needs JavaScript. The hint and the solution open without it.
Hint
Split the hours by how many of their digits are at most , because the tens digits of minutes and seconds must be at most .
Solution
- The hours with different digits are in number: of them have both digits at most ( to , , to , , , ) and have one larger digit ( to , to ).
- For an hour with both digits at most , choosing the tens digit of the minutes ( ways), the units digit of the minutes ( small or large) and then the seconds digits gives completions.
- For an hour with one larger digit the same count is completions.
- The total is .
Answer: