1.5 超级肋骨质数
来源:互联网 发布:linux修改密码的命令 编辑:程序博客网 时间:2024/05/17 03:27
Superprime Rib
Butchering Farmer John's cows always yields the best prime rib. Youcan tell prime ribs by looking at the digits lovingly stamped acrossthem, one by one, by FJ and the USDA. Farmer John ensures that apurchaser of his prime ribs gets really prime ribs because when slicedfrom the right, the numbers on the ribs continue to stay prime right down to the last rib, e.g.:
7 3 3 1
The set of ribs denoted by 7331 is prime; the three ribs 733 areprime; the two ribs 73 are prime, and, of course, the last rib, 7, isprime. The number 7331 is called a superprime of length 4.
Write a program that accepts a number N 1 <=N<=8 of ribs andprints all the superprimes of that length.
The number 1 (by itself) is not a prime number.
PROGRAM NAME: sprime
INPUT FORMAT
A single line with the number N.
SAMPLE INPUT (file sprime.in)
4
OUTPUT FORMAT
The superprime ribs of length N, printed in ascending order one perline.
SAMPLE OUTPUT (file sprime.out)
2333
2339
2393
2399
2939
3119
3137
3733
3739
3793
3797
5939
7193
7331
7333
7393
- 1.5 超级肋骨质数
- 质数肋骨
- [USACO 1.5.3]特殊的质数肋骨
- [USACO 1.5.3]特殊的质数肋骨
- Usaco 1.5.3 特殊的质数肋骨(特殊的质数肋骨)
- 特殊的质数肋骨
- 特殊的质数肋骨
- 特殊的质数肋骨
- 特殊的质数肋骨
- USACO-1.5.3 Superprime Rib 特殊的质数肋骨
- USACO:1.5.3 Superprime Rib 特殊的质数肋骨
- USACO 1.5 Superprime Rib 特殊的质数肋骨(模拟)
- USACO:1.5.3 Superprime Rib 特殊的质数肋骨
- USACO 1.5 特殊的质数肋骨
- USACO 1.5 特殊的质数肋骨 Superprime Rib
- YTU.1420: 1.5.3 Superprime Rib 特殊的质数肋骨
- USACO 特殊的质数肋骨
- 超级质数
- 线程的初始化到运行过程
- 关于指针的一些笔记
- 静态绑定和动态绑定
- Qt 开发中关于 connectSlotsByname 的心得
- 写在11月11日后
- 1.5 超级肋骨质数
- 三层与mvc以及Spring.Net,Nhibernate处在的哪一层
- IIS承载,网站项目“添加服务引用”的时候能发现服务
- 笑到肚子痛的几个图片
- [DP] poj1837
- vc中socket编程步骤及实例
- [汇总I]精选微软等公司数据结构+算法面试100题[第1-60题汇总]
- [DP] boj1440
- 11月互联网性能评测结果:电子商务行业首屏时间升至4s