#A. A - Distinct Strings

    传统题 1000ms 256MiB

A - Distinct Strings

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

A - Distinct Strings

Score : $100$ points

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$?

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:

SS

Output

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


aba
3

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


ccc
1

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


xyz
6

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

2025春季ATC码力训练基础营第一次比赛

未参加
状态
已结束
规则
IOI
题目
6
开始于
2025-3-9 18:00
结束于
2025-3-9 19:30
持续时间
1.5 小时
主持人
参赛人数
4