题目
acm The Least Palindromic Number
Description
Palindromic numbers are digital strings that read the same both forwards and backwards. For example, 121, 44 and 3 are Palindromic numbers, 175, 36 are not;
For a given integer N, you are to find a palindromic number P that satisfy P>N. However, there are many such palindromic numbers. Your task is to find the least one.
Input
There are several test cases, each test case contains only one positive integer N in one line. The number of digits of N is not exceeding 10,000, and N has not lead zeroes.
The input will finish with the end of file.
Output
For each the case, your program will output the least palindromic number P (P > N) on separate line.
Sample Input
44
3
175
Sample Output
55
4
181
求高手解答.
Description
Palindromic numbers are digital strings that read the same both forwards and backwards. For example, 121, 44 and 3 are Palindromic numbers, 175, 36 are not;
For a given integer N, you are to find a palindromic number P that satisfy P>N. However, there are many such palindromic numbers. Your task is to find the least one.
Input
There are several test cases, each test case contains only one positive integer N in one line. The number of digits of N is not exceeding 10,000, and N has not lead zeroes.
The input will finish with the end of file.
Output
For each the case, your program will output the least palindromic number P (P > N) on separate line.
Sample Input
44
3
175
Sample Output
55
4
181
求高手解答.
提问时间:2021-01-06
答案
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
热门考点
- 1by english is i love you
- 2一套凯凯椅业的学生课桌椅售价120元,其中椅子的价格比桌子少40%,一张桌子售价多少元呢?
- 3一个数是四个2,三个3,两个5,一个7的连乘,这个数的因数中,最大的两位是( )
- 4秋风吹过,一片片落叶犹如什么(仿写)
- 5一个圆锥比与它等底等高的圆柱的体积小5cm,这个圆锥体积是多少
- 62012秋季荣德基好卷的六年级上册数学期中试卷的题目~
- 7解方程1)根号X+2乘以根号2X-1-根号3=0 2)根号X+5+根号X-3=4
- 8需要高温高压和催化剂三个条件的化学反应
- 9椭圆x^2/4+y^2/3=1的面积为
- 10计算与化简:根号x^2-4x+4+根号x^2-6x+9(2≤x≤3)