E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
欧拉计划
如何快速解决
欧拉计划
第三题:素数问题
翻译成中文,第三题的题目是这样的:13195的质数因子有5,7,13和29.600851475143的最大质数因子是多少?当然这个题目的思路是很简单的第一:找出他所有的因数,第二:看他的因数是不是质数;但是这里要求程序在一分钟内得到结果,我先来看我最初的设计:usestrict; usewarnings; usebignum; my$num; my$i; my$cout=2; while($co
gaorongchao1990626
·
2012-12-08 10:00
perl解析
欧拉计划
:Progect Euler1--2题
Problem1:1000一下,能被3,5整除的数的和Ifwelistallthenaturalnumbersbelow10thataremultiplesof3or5,weget3,5,6and9.Thesumofthesemultiplesis23.Findthesumofallthemultiplesof3or5below1000.my$sum=0; foreach(1..999) { $s
gaorongchao1990626
·
2012-12-07 11:00
欧拉计划
第6题
Problem 6: The sum of the squares of the first ten natural numbers is, 1^2+2^2+…10^2 = 385, The square of the sum of the first ten natural numbers is, (1+2+…+10)^2 = 55^2 = 3025, Hence the diffe
ll_0520
·
2012-04-30 19:00
n2
欧拉计划
第5题
Problem 5: 2520 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 o
ll_0520
·
2012-04-30 19:00
测试
n2
欧拉计划
第4题
Problem 4: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009=91*99. Find the largest palindrome made from the produ
ll_0520
·
2012-04-30 19:00
null
欧拉计划
第3题
Problem 3: The prime factors of 13195 are 5,7,13 and 29. What is the largest prime factor of the number 600851475143.问题3: 13195的质因数为5,7,13和29。 600851475143最大的质因数是多少?分析: 6
ll_0520
·
2012-04-30 18:00
欧拉计划
第2题
Problem 2: Each new term int the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the fist 10 terms will be:1,2,3,5,8,13,21,34,55,89,…By considering t
ll_0520
·
2012-04-30 18:00
n2
欧拉计划
第1题
Problem 1:If we list all the natural numbers below 10 that are multiples of 3 or 5,we get 3,5,6 and 9.The sum of these multiples is 23.Find the sum of all the multiples of 3 or 5 below 1000.问题1:如果我们列出
ll_0520
·
2012-04-30 18:00
欧拉计划
解题源码与报告持续发表开始了
最近因为参加一个软件大赛发现了这个数学与程序设计的题库:http://projecteuler.net。特别喜欢这个题库。由于题库不能提交源代码,只需要结果。所以以后就在这里保存我的源码和解题报告。
paul08colin
·
2012-04-12 21:00
欧拉计划
网第二十三题解决方案
题目23:算出所有不能写成两个过剩数之和的正整数之和。如果一个数的所有真因子之和等于这个数,那么这个数被称为完全数。例如,28的所有真因子之和为1+2+4+7+14=28,所以20是一个完全数。如果一个数的所有真因子之和小于这个数,称其为不足数,如果大于这个数,称其为过剩数。12是最小的过剩数,1+2+3+4+6=16。因此最小的能够写成两个过剩数之和的数字是24。经过分析,可以证明所有大于28
x_dreamfly
·
2012-02-26 14:00
欧拉计划
网第十四题解决方案
题目14:找出以100万以下的数字开始的最长序列。以下迭代序列定义在整数集合上:nn/2(当n是偶数时)n3n+1(当n是奇数时)应用以上规则,并且以数字13开始,我们得到以下序列:134020105168421可以看出这个以13开始以1结束的序列包含10个项。虽然还没有被证明(Collatz问题),但是人们认为在这个规则下,以任何数字开始都会以1结束。以哪个不超过100万的数字开始,能给得到最
x_dreamfly
·
2012-02-25 20:00
欧拉计划
网第十二题解决方案
题目12:第一个拥有超过500个约数的三角形数是多少?三角形数序列是由对自然数的连加构造而成的。所以第七个三角形数是1+2+3+4+5+6+7=28.那么三角形数序列中的前十个是:1,3,6,10,15,21,28,36,45,55,...下面我们列出前七个三角形数的约数:1:13:1,36:1,2,3,610:1,2,5,1015:1,3,5,1521:1,3,7,2128:1,2,4,7,1
x_dreamfly
·
2012-02-25 20:00
欧拉计划
网第十题解决方案
题目10:计算两百万以下所有质数的和。10以下的质数的和是2+3+5+7=17.找出两百万以下所有质数的和。问题解决方案:publicclassnum10{ /** *@paramargs */ publicstaticvoidmain(String[]args){ //TODOAuto-generatedmethodstub inti,t=2; doublesum=7;
x_dreamfly
·
2012-02-25 20:00
欧拉计划
网第九题解决方案
题目9:找出唯一的满足a+b+c=1000的毕达哥拉斯三元组{a,b,c}。一个毕达哥拉斯三元组是一个包含三个自然数的集合,a
x_dreamfly
·
2012-02-25 20:00
欧拉计划
网第七题解决方案
题目7:找出第10001个质数。前六个质数是2,3,5,67,11和13,其中第6个是13.第10001个质数是多少?问题解决方案:publicclassnum7{ /** *@paramargs */ publicstaticvoidmain(String[]args){ //TODOAuto-generatedmethodstub inti,j=2,t=2; for(i
x_dreamfly
·
2012-02-25 20:00
String
Class
欧拉计划
网第五题解决方案
题目5:找出最小的能被1-20中每个数整除的数。2520是最小的能被1-10中每个数字整除的正整数。最小的能被1-20中每个数整除的正整数是多少?问题解决方案:publicclassnum5{ /** *@paramargs */ publicstaticvoidmain(String[]args){ //TODOAuto-generatedmethodstub inta,i
x_dreamfly
·
2012-02-25 20:00
String
Class
欧拉计划
网第十五题解决方案
题目15:从20*20的网格的左上角通往右下角有多少条路?从一个22网格的左上角开始,有6条(不允许往回走)通往右下角的路。 对于2020的网格,这样的路有多少条?问题解决方案:importjava.util.Arrays; publicclassnum15{ /** *@paramargs */ publicstaticvoidmain(String[]args){ /
x_dreamfly
·
2012-02-25 20:00
String
Class
import
欧拉计划
网第十九题解决办法——两种方案
题目19:20世纪有多少个星期日是当月的第一天?以下是一些已知信息,但是或许你需要自己做一些其他的调查。1900年1月1日是星期一。30天的月份有:9月,4月,6月,11月。此外的月份都是31天,当然2月除外。2月在闰年有29天,其他时候有28天。年份可以被4整除的时候是闰年,但是不能被400整除的世纪年(100的整数倍年)除外。20世纪(1901年1月1日到2000年12月31日)一共有多少个星
x_dreamfly
·
2012-02-25 19:00
上一页
1
2
3
4
5
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他