#C5552. Unique Playlists Permutations
Unique Playlists Permutations
Unique Playlists Permutations
You are given a playlist represented as a string. Each character in the string represents a unique song. Your task is to calculate the number of unique playlists that can be created by reordering (permuting) all the songs, using each song exactly once.
The answer is computed using the factorial of the number of songs, i.e., if there are n songs, the number of unique playlists is given by:
$$n!$$
For example, if the playlist is "abc" then the number of unique playlists is 3! = 6
.
inputFormat
The input consists of a single line containing the playlist string.
Constraints: The playlist will contain only distinct characters.
outputFormat
The output is a single integer representing the number of unique playlists that can be created, which is the factorial of the length of the playlist.
## samplea
1