Distinct Strings

AtCoder
IDabc225_a
Time2000ms
Memory256MB
Difficulty
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$? ## Constraints * $S$ is a string $S$ of length $3$ consisting of lowercase English letters. ## Input Input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
aba
Output #1
3

By permuting the characters in $S=$ `aba`, three different strings can be obtained: `aab`, `aba`, `baa`.
Input #2
ccc
Output #2
1

By permuting the characters in $S=$ `ccc`, just one string can be obtained: `ccc`.
Input #3
xyz
Output #3
6

By permuting the characters in $S=$ `xyz`, six different strings can be obtained: `xyz`, `xzy`, `yxz`, `yzx`, `zxy`, `zyx`.
API Response (JSON)
{
  "problem": {
    "name": "Distinct Strings",
    "description": {
      "content": "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$?",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc225_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$ of length $3$ consisting of lowercase English letters.\nHow many different strings can be obtained by permuting the characters in $S$?\n\n## Constraints\n\n*   $S$ is a string $S...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments