最大回文数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
回文数指的是一个数字,从左到右读和从右到左读都一样。例如, 和 是回文数, 不是回文数。现有 个正整数 ,请找出其中最大的回文数。
输入格式
输入文件的第一行只有一个正整数 ,代表正整数 的个数。
接下来的 行,每行包含一个正整数 。输入保证一定有回文数。
输出格式
输出文件一行,一个正整数,即最大的回文数。
样例 #1
样例输入 #1
3
4718
1221
121
样例输出 #1
1221
样例 #2
样例输入 #2
5
3944
953
8
75739
46
样例输出 #2
8
提示
【输入输出样例 1 说明】
回文数有 和 ,最大的回文数是 。
【输入输出样例 2 说明】
回文数只有一个 ,因此最大的回文数就是 。
【数据说明】
对于 的数据,,。
对于 的数据,,。
对于 的数据,,。
2025年入门组测试二(2025.1.22)
- Status
 - Done
 - Rule
 - IOI
 - Problem
 - 5
 - Start at
 - 2025-1-23 17:00
 - End at
 - 2025-1-23 20:00
 - Duration
 - 3 hour(s)
 - Host
 - Partic.
 - 5