题目:
题解:
func countNumbersWithUniqueDigits(n int) int {if n == 0 {return 1}if n == 1 {return 10}ans, cur := 10, 9for i := 0; i < n-1; i++ {cur *= 9 - ians += cur}return ans
}
题目:
题解:
func countNumbersWithUniqueDigits(n int) int {if n == 0 {return 1}if n == 1 {return 10}ans, cur := 10, 9for i := 0; i < n-1; i++ {cur *= 9 - ians += cur}return ans
}