Toggle navigation
HUSTOJ
F.A.Qs
ProblemSet
Source/Category
Status
Ranklist
Contest
Login
Language
中文
ئۇيغۇرچە
English
فارسی
ไทย
한국어
Problem H: 回文质数
Problem H: 回文质数
[Creator :
]
Time Limit :
1000.000
sec
Memory Limit :
64 MB
Solved: 47
Submit: 86
Statistics
Description
因为151即是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。 写一个程序来找出大过a的最小的回文质数。
Input
第 1 行: 一个整数 a .(a<100000)
Output
输出一个回文质数。
Sample Input
Copy
10301
Sample Output
Copy
10501