実行時間制限: 2 sec / メモリ制限: 256 MB
配点 : 100 点
問題文
3 桁の正の整数 N が与えられます。
N が 回文数であるかを判定してください。
回文数とは、10 進法において数字を逆から並べても元の数と同じになる数のことを表します。
制約
- 100≦N≦999
- N は整数
入力
入力は以下の形式で標準入力から与えられる。
N
出力
N が回文数である場合は Yes
、そうでない場合は No
を出力せよ。
入力例 1
575
出力例 1
Yes
N=575 は逆から数字を並べても 575 となるため回文数です。したがって、Yes
と出力します。
入力例 2
123
出力例 2
No
N=123 は逆から数字を並べると 321 となり、回文数ではないため No
と出力します。
入力例 3
812
出力例 3
No
Score : 100 points
Problem Statement
You are given a three-digit positive integer N.
Determine whether N is a palindromic number.
Here, a palindromic number is an integer that reads the same backward as forward in decimal notation.
Constraints
- 100≤N≤999
- N is an integer.
Input
Input is given from Standard Input in the following format:
N
Output
If N is a palindromic number, print Yes
; otherwise, print No
.
Sample Input 1
575
Sample Output 1
Yes
N=575 is also 575 when read backward, so it is a palindromic number. You should print Yes
.
Sample Input 2
123
Sample Output 2
No
N=123 becomes 321 when read backward, so it is not a palindromic number. You should print No
.
Sample Input 3
812
Sample Output 3
No