P24215 [AtCoder] Distinct Strings
入门
题目描述

Problem Statement

You are given a string S of length 3 consisting of lowercase English letters.
How many different strings can be obtained by permuting the characters in S?

Input

Input is given from Standard Input in the following format:
S

Output

Print the number of different strings that can be obtained by permuting the characters in S.

Constraints

  • S is a string S of length 3 consisting of lowercase English letters.

Sample Input 1

aba

Sample Output 1

3

By permuting the characters in S= aba, three different strings can be obtained: aab, aba, baa.

Sample Input 2

ccc

Sample Output 2

1

By permuting the characters in S= ccc, just one string can be obtained: ccc.

Sample Input 3

xyz

Sample Output 3

6

By permuting the characters in S= xyz, six different strings can be obtained: xyz, xzy, yxz, yzx, zxy, zyx.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
aba
样例输出
3