Let S be the set of the integers from 1 to N.
Write a program that counts how many subsets of S are good sets.
A subset is a good set when you write every number it contains in decimal, collect all of those digits together, and each of the digits 0 to 9 appears at most once. The empty set is not counted.
For example, {12, 345, 67890} and {47, 109} are good sets, while {147, 342} is not a good set because the digit 4 appears twice.