100 atcoder#ABC225A. [ABC225A] Distinct Strings
[ABC225A] Distinct Strings
Score : points
Problem Statement
You are given a string of length consisting of lowercase English letters.
How many different strings can be obtained by permuting the characters in ?
Constraints
- is a string of length consisting of lowercase English letters.
Input
Input is given from Standard Input in the following format:
Output
Print the number of different strings that can be obtained by permuting the characters in .
aba
3
By permuting the characters in aba
, three different strings can be obtained: aab
, aba
, baa
.
ccc
1
By permuting the characters in ccc
, just one string can be obtained: ccc
.
xyz
6
By permuting the characters in xyz
, six different strings can be obtained: xyz
, xzy
, yxz
, yzx
, zxy
, zyx
.