Project Euler 5
来源:互联网 发布:国内网络加速器 编辑:程序博客网 时间:2024/06/06 17:10
'''Created on 2014年8月26日Smallest multiple2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?@author: wxp2971'''# 从解答中伪代码中编写的,开始的思路是自己手工化简的,人工确定需要那些项,质数的概念from numpy import *k = 20N = 1i = 1pVal =[2,3,5,7,11,13,17,19]limit = sqrt(k)check = Truefor i in range(len(pVal)): tempVal = 1 if check: if pVal[i] <= limit: tempVal = floor(log(k) /log(pVal[i])) else: check = False N = N *(power(pVal[i],int(tempVal)))print(N)
0 0
- Project Euler - Problem 5
- Project Euler-5
- Project Euler problem 5
- Project Euler 5
- Project Euler 1~5
- Project Euler 5
- Project Euler - 5
- project euler 5
- Project Euler Problem1-5
- project euler 5
- 【Project Euler】5 第五题
- Python实现Project Euler 5
- Project Euler 1-5题
- Project Euler
- project euler
- Project Euler
- 【Project Euler】【Problem 5】Smallest multiple
- project euler problem 5:Smallest multiple
- CSS使元素居中的方法
- Android组件通信--Intent
- AMQP协议四
- eclipse aptana插件 —— 【javascript|html|css|jquery|…】自动提示
- U3D C#文件读写
- Project Euler 5
- git服务器架设
- ACM c++ map容器基本操作
- 踏踏实实开始PHP的基础
- 近期计划
- 使用DXT5纹理作为normalmap提高精度的方法
- php每日学习总结(10)
- LeetCode之旅(10)
- 就是给他人人有家人已经