304526: CF863A. Quasi-palindrome
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Quasi-palindrome
题意翻译
准回文数是这样一个数字,在这个数字的前面添加一些前导0(可能不添加),使它变成一个回文串。现在给你一个数,判断是否为准回文数。 输入:第一行包含一个整数x(1<=x<=10^9)。这个数字没有任何前导零。 输出:如果数字x是准回文数,则输出“YES”。否则,输出“NO”(不含引号)。 感谢 @SocietyNiu 提供的翻译。题目描述
Let quasi-palindromic number be such number that adding some leading zeros (possible none) to it produces a palindromic string. String $ t $ is called a palindrome, if it reads the same from left to right and from right to left. For example, numbers $ 131 $ and $ 2010200 $ are quasi-palindromic, they can be transformed to strings " $ 131 $ " and " $ 002010200 $ ", respectively, which are palindromes. You are given some integer number $ x $ . Check if it's a quasi-palindromic number.输入输出格式
输入格式
The first line contains one integer number $ x $ ( $ 1<=x<=10^{9} $ ). This number is given without any leading zeroes.
输出格式
Print "YES" if number $ x $ is quasi-palindromic. Otherwise, print "NO" (without quotes).
输入输出样例
输入样例 #1
131
输出样例 #1
YES
输入样例 #2
320
输出样例 #2
NO
输入样例 #3
2010200
输出样例 #3
YES