問題一覧 > 通常問題

No.2322 MMA String

レベル : / AI推定難易度 : 77 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 329
作問者 : Nafmo2 / テスター : tyawanmusi hikikomori sepa38
お気に入りにしたユーザー ProblemId : 1599 / 自分の提出
問題文最終更新日: 2023-05-17 04:03:22
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
MMA Contest 015 (順位表) の他の問題:

Problem Statement

An MMA string is a string of $3$ characters that consists of $2$ kinds of letters and whose $1$st and $2$nd characters are the same.

You are given a string $S$ consisting of $3$ uppercase letters.

Print Yes if it is an MMA string, and No otherwise.

Input

$S$
  • $|S|=3$
  • All characters in $S$ are uppercase letters.

Output

Print Yes if $S$ is an MMA string, and No otherwise.

Sample

Sample 1
Input
MMA
Output
Yes

It consists of $2$ kinds of letters, M and A, and its $1$st and $2$nd characters are equal, so it is an MMA string.

Sample 2
Input
UEC
Output
No

It consists of $3$ kinds of letters, U, E, and C, so it does not qualify.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。