/
実行時間制限: 2 sec / メモリ制限: 1024 MiB
配点 : 100 点
問題文
英小文字からなる 2 文字以上の文字列 S が与えられます。
S の先頭の文字と末尾の文字が同じ文字かどうか判定してください。
制約
- S は英小文字からなる長さ 2 以上 10 以下の文字列
入力
入力は以下の形式で標準入力から与えられる。
S
出力
S の先頭の文字と末尾の文字が同じ文字ならば Yes を、異なる文字ならば No を出力せよ。
入力例 1
luminol
出力例 1
Yes
先頭の文字は l、末尾の文字は l で一致しています。したがって Yes を出力してください。
入力例 2
rule
出力例 2
No
先頭の文字は r、末尾の文字は e で一致していません。したがって No を出力してください。
Score : 100 points
Problem Statement
You are given a string S of length at least 2 consisting of lowercase English letters.
Determine whether the first character and the last character of S are the same.
Constraints
- S is a string of length between 2 and 10, inclusive, consisting of lowercase English letters.
Input
The input is given from Standard Input in the following format:
S
Output
If the first character and the last character of S are the same, output Yes; otherwise, output No.
Sample Input 1
luminol
Sample Output 1
Yes
The first character is l and the last character is l, which match. Thus, output Yes.
Sample Input 2
rule
Sample Output 2
No
The first character is r and the last character is e, which do not match. Thus, output No.