点击这里更换您喜欢的皮肤wtboj 首页
请点击这里登入noios   首页 入门 c++讲义 入门教程视频 金牌教程 入门视频 站务 公告 | 题库 记录 竞测 测试 闯关 作业 排名 团队 讨论 | 换肤 | 登入 注册  
News >>   新增功能:各团队管理员可以发布本团队作业了 ()

From sina007
回文质数
背景 Background
  为了for beginngers,特设此题,^_^
描述 Description
  回文质数    
【问题描述】
因为151即是一个质数又是一个回文数(从左到右和从右到左是看一样的),所以 151 是回文质数。
写一个程序来找出大过a的最小的回文质数。
【输入格式】
第 1 行: 一个整数 a .(a<100000)
【输出格式】
输出一个回文质数。
【输入样例】
10301
【输出样例】
10501
输入格式 Input Format
  一个整数 a .(a<100000)
输出格式 Output Format
  输出一个回文质数。
样例输入 Sample Input
 
样例输出 Sample Output
 
时间限制 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
提交 讨论 题解
 Copyright wtboj © 2005-2006. www.wutuobang.date Powered by wtboj 关于 联系 帮助
 wtboj Information ---- Total Users : 1242 | Online Users / Processes : 0 / 50 | Processed Time : 66 ms | Server Time : 2025/4/27 2:47:14