Three-digit number
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
How many unique three-digit numbers can be formed by using each digit of the given number exactly once?
Input
A single positive three-digit integer.
Output
The number of distinct three-digit numbers that can be formed.
Examples
Input #1
Answer #1
Input #2
Answer #2
Note
For example, from the number 123, you can create 6 different three-digit numbers: 123, 132, 213, 231, 312, 321. However, from the number 122, you can only form 3 distinct numbers: 122, 212, 221.
Submissions 1K
Acceptance rate 14%