def check(2) , do: true
def check(n) when n >2 do
b = for x <- (Enum.into 2..n-1,[]),do: x
if chec(n,b,[]) == [] do
true
end
end def chec(n,[m|r],ss) when rem(n,m) ==0, do: chec(n,r,[m|ss])
def chec(n,[m|r],ss), do: chec(n,r,ss)
def chec(n,[],ss), do: ss def span2(n) when n > 2 do
for x <- (Enum.into 2..n, []), check(x) == true , do: x
end
def span2(n), do: "n must > 2"
IO.inspect(span2(40))

[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]

  

  

最新文章

  1. ubuntu 下应用 Python 和 SL4A 的 Android 应用程序搭建您自己的android研发环境
  2. 基于网格的波动方程模拟(Wave equation on mesh)附源码
  3. C#中用schema验证xml的合法性
  4. mq_unlink
  5. poj3083
  6. 使用HTML5 WebDataBase设计离线数据库
  7. mac在 aliyun linux ecs实例上安装 jdk tomcat mysql
  8. 【转】windows消息16进制对应表
  9. 写一个Windows上的守护进程(5)文件系统重定向
  10. XSD (xml Schema Definition)
  11. 【剑指offer】员工年龄排序
  12. SLAM入门之视觉里程计(2):相机模型(内参数,外参数)
  13. Unity3D实现多语言切换
  14. Zookeeper的概述、安装部署及选举机制
  15. D5 F
  16. .NET Core 用 VS Code新建各种类型的项目
  17. 大数据学习路线:Zookeeper集群管理与选举
  18. CRM 更新解决方案之注意事项
  19. UI自动化环境准备
  20. Leetcode: Binary Tree Level Order Transversal II

热门文章

  1. [翻译]Component Registration in Script System 在脚本系统中注册组件
  2. 解决json结合struts2时,Class org.apache.struts2.json.JSONWriter can not access a member of * 的问题
  3. jenkins任务构建失败重试插件Naginator Plugin
  4. ashx、aspx、ASP.NET MVC
  5. Git命令行学习积累
  6. html中常用的标签元素
  7. UWP开发砸手机系列(一)—— Accessibility
  8. Vue前端数据采集 埋点 追踪用户系列行为
  9. Luogu1438 无聊的数列(单点查询)&amp;&amp;加强版(区间查询)
  10. ADV拍卖