Problem 1012 · Hard

Numbers With Repeated Digits

Count the numbers up to n whose digits are all distinct, walking the digits of n and multiplying out the free positions, then subtract from n.

Open the interactive visualisation