A Unique Number is defined as a positive integer with no repeated digits. This means that and are unique numbers, but and are not.
Given the number B, write a program the calculates the number of unique numbers in base-B.
For example:
In base-2, there are only 2 unique numbers: .
In base-3, there are 10 unique numbers: .
In base-4, there are 48 unique numbers:
And in base-10, there are 8,877,690 unique numbers.
The output could be greater than flintmax, therefore please present your output as character strings.

Solution Stats

2 Solutions

2 Solvers

Last Solution submitted on May 15, 2023

Last 200 Solutions

Solution Comments

Show comments
Loading...