No.3706 Unbroken Text
タグ : / 解いたユーザー数 76
作問者 :
UT0911
/ テスター :
Problem Statement
Yu-T noticed that U and T from his name are adjacent in alphabetical order.
Prompted by this, he decided to look into whether there are other pairs of adjacent letters.
Being adjacent in alphabetical order means that the $2$ uppercase English letters are consecutive in alphabetical order, regardless of the order in which they are given.
A and Z are not adjacent.
Determine whether the uppercase English letters $C_1, C_2$ form a pair of adjacent letters.
Constraints
- $C_1, C_2$ are uppercase English letters
Input
$C_1\;C_2$
Output
Print Yes if they form a pair of adjacent letters, and No otherwise.
Print a newline at the end.
Sample
Sample 1
Input
U T
Output
Yes
In alphabetical order, U comes right after T,
so T and U form a pair of adjacent letters, and you should print Yes.
Sample 2
Input
A I
Output
No
A and I do not form a pair of adjacent letters.
Sample 3
Input
Y Z
Output
Yes
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。