质数肋骨
来源:互联网 发布:网站制作优化 编辑:程序博客网 时间:2024/04/28 10:33
QAQ
这个是凑数呵呵呵,不是拆。
#include <cstdio>#include <iostream>#include <algorithm> #include <cmath>using namespace std;int n;int zs(int x){ if(x==0) return 0; if(x==1) return 0; if(x==2) return 1; for(int i=2;i*i<=x;i++) if(x%i==0)return 0; return 1;}/*int pd(int x){ while(x) { if(!zs(x)) { f[x]=-1; return 0; } else f[x]=1; x/=10; } return 1;}*/ void dfs(int u,int x){ for(int i=1;i<=9;i++) if(zs(x*10+i))//造数判断是否是质数 { if(u==n) printf("%d\n",x*10+i); else dfs(u+1,x*10+i); }}int main(){ scanf("%d",&n); dfs(1,0); return 0;}
1 0
- 质数肋骨
- 1.5 超级肋骨质数
- 特殊的质数肋骨
- 特殊的质数肋骨
- 特殊的质数肋骨
- 特殊的质数肋骨
- USACO 特殊的质数肋骨
- Superprime Rib特殊的质数肋骨
- [USACO 1.5.3]特殊的质数肋骨
- [USACO 1.5.3]特殊的质数肋骨
- USACO特殊的质数肋骨题解
- [USACO1.5]特殊的质数肋骨
- codevs 2080 特殊的质数肋骨
- CODE[VS] 2080 特殊的质数肋骨
- 蓝桥杯 算法提高 特殊的质数肋骨
- 算法提高 特殊的质数肋骨
- 洛谷P1218 特殊的质数肋骨
- 算法提高 特殊的质数肋骨
- shell字符串截取方法
- 1068. 万绿丛中一点红(20)
- EXCEL常用函数
- ACM程序设计书上题目W
- Spring Data Jpa
- 质数肋骨
- docker-centos容器的远程连接
- ECR
- 图数据库与关系型数据库的区别与联系
- 解决在虚拟机上安装centos之后不能ping的问题
- 去掉navigationBar下面的黑线
- geetset极验iOS移动端
- 日常检查和维护数据库
- 序列和