Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 618 Bytes

0357-count-numbers-with-unique-digits.adoc

File metadata and controls

26 lines (17 loc) · 618 Bytes

357. Count Numbers with Unique Digits

{leetcode}/problems/count-numbers-with-unique-digits/[LeetCode - Count Numbers with Unique Digits^]

Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n.

Example:

Input: 2
Output: 91
Explanation: The answer should be the total numbers in the range of 0 ≤ x < 100,
             excluding 11,22,33,44,55,66,77,88,99
link:{sourcedir}/_0357_CountNumbersWithUniqueDigits.java[role=include]