|
|
|
|
背景 Background |
|
|
为了for beginngers,特设此题,^_^
|
|
|
|
|
|
|
|
描述 Description |
|
|
回文质数
【问题描述】
因为151即是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。
写一个程序来找出大过a的最小的回文质数。
【输入格式】
第 1 行: 一个整数 a .(a<100000)
【输出格式】
输出一个回文质数。
【输入样例】
10301
【输出样例】
10501
|
|
|
|
|
|
|
|
输入格式 Input Format |
|
|
一个整数 a .(a<100000)
|
|
|
|
|
|
|
|
输出格式 Output Format |
|
|
输出一个回文质数。 |
|
|
|
|
|
|
|
时间限制 Time Limitation |
|
|
各个测试点1s
|
|
|
|
|
|
|
|
注释 Hint |
|
|
Free Pascal Code:
-------------------
program Plus;
var a,b:longint;
begin
readln(a,b);
writeln(a+b);
end.
C++ Code:
-------------------
#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
}
|
|
|
|
|
|
|
|
|
Flag |
|
题号 |
P1642 |
|
模拟 |
通过 |
49人 |
提交 |
222次 |
通过率 |
22% |
难度 |
1 |
|
|
|
|
|
|