2022-03-27 18:35:17 +08:00
< p > Given an integer < code > n< / code > , return the count of all numbers with unique digits, < code > x< / code > , where < code > 0 < = x < 10< sup > n< / sup > < / code > .< / p >
< p > < / p >
2023-12-09 18:42:21 +08:00
< p > < strong class = "example" > Example 1:< / strong > < / p >
2022-03-27 18:35:17 +08:00
< pre >
< strong > Input:< / strong > n = 2
< strong > Output:< / strong > 91
< strong > Explanation:< / strong > The answer should be the total numbers in the range of 0 ≤ x < 100, excluding 11,22,33,44,55,66,77,88,99
< / pre >
2023-12-09 18:42:21 +08:00
< p > < strong class = "example" > Example 2:< / strong > < / p >
2022-03-27 18:35:17 +08:00
< pre >
< strong > Input:< / strong > n = 0
< strong > Output:< / strong > 1
< / pre >
< p > < / p >
< p > < strong > Constraints:< / strong > < / p >
< ul >
< li > < code > 0 < = n < = 8< / code > < / li >
< / ul >