Problem 2376 · Hard

Count Special Integers

Count the positive integers up to n whose digits are all distinct by walking n once and multiplying out the free positions.

Open the interactive visualisation