主页
试题仓库
题目列表
试题分类
经典教材
竞赛作业
竞赛列表
提交状态
图灵学院
TuringMOOC
图灵书屋
图灵商城
图灵实验室
图灵会员
历史荣誉
支持我们
图灵IDE
用户/排名
AOJ排名
实名认证
请登录
常用链接
AOJ考试平台
老赵的Gitee代码
编译原理模拟考试平台
Java技术手册
FCC网站
菜鸟网
在线工具箱
字节豆包GPT
代码可视化
力扣网
牛客网
洛谷
杭电OJ
CodeForce
隐藏编译器
Problem 2870 --1.2.5 Dual Palindromes
2870: 1.2.5 Dual Palindromes
上一题
正确率: $53.85\%$
下一题
Time Limit
$1$ 秒/Second(s)
Memory Limit
$512$ 兆字节/Megabyte(s)
提交总数
$13$
正确数量
$7$
"
裁判形式
标准裁判/Standard Judge
我的状态
尚未尝试
难度
分类标签
usaco
模拟
×
为本题添加算法分类(请不要超过5个)
当前分类(单击移除):
usaco
模拟
单击选择分类:
Description
<p> A number that reads the same from right to left as when read from left to right is called a palindrome. The number 12321 is a palindrome; the number 77778 is not. Of course, palindromes have neither leading nor trailing zeroes, so 0220 is not a palindrome. </p> <p> The number 21 (base 10) is not palindrome in base 10, but the number 21 (base 10) is, in fact, a palindrome in base 2 (10101). </p> <p> Write a program that reads two numbers (expressed in base 10): </p> <ul> <li> N (1 <= N <= 15) </li> <li> S (0 < S < 10000) </li> </ul> and then finds and prints (in base 10) the first N numbers strictly greater than S that are palindromic when written in two or more number bases (2 <= base <= 10). <p> Solutions to this problem do not require manipulating integers larger than the standard 32 bits. </p> <h3> PROGRAM NAME: dualpal </h3>
Input
<p> A single line with space separated integers N and S. </p>
Output
N lines, each with a base 10 number that is palindromic when expressed in at least two of the bases 2..10. The numbers should be listed in order from smallest to largest.
Sample Input
3 25
Sample Output
26 27 28
推荐代码
查看2870 所有题解
上传题解视频得图灵币
本题记录
用 户(点击查看用户)
运行号(点击购买题解)
时 间
算法最快[$0 $ms]
0
内存最少[$0 $KB]
0
第一AC
0
第一挑战
0
赛题来源
usaco training
usaco Training
AOJ
Please Login