Dsa
Math
Easy
Unique Digit Combinations
Given an integer n, output the number of unique combinations of n digits where digits can range from 0 to 9 and no digit can be repeated within a combination. The order of digits does not matter.
Input Format:
- A single integer n (1 <= n <= 10)
Output Format:
- Print the number of unique combinations of n digits.
Example:
Input:
3
Output:
120
(Explanation: The unique combinations of 3 digits chosen from 0-9 are 10 choose 3, which equals 120).
Key concepts
mathcombinatoricscounting
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now