解法探求
sadbbs
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
地铁上想到的一个关于日期的问题(2009-09-22)
昨天在地铁上,突然想到当天是21号,星期一。打开手机看了一下,2001年1月1号正好是星期一。于是就有一个有趣的问题:那么21世纪中(2001-2100),每个月的1号,同时又是星期一的日子大约有多少天:A. 50 B. 150 C. 350 D. 550当然,答案是后来设计的。当时我考虑这个问题,每个月1号是星期一,具有随机性。按概率算,整个世纪共有100*12个1号,1/7是星...2010-04-17 17:40:29 · 164 阅读 · 0 评论 -
用Python解答 ProjectEuler问题(1)
有个很有意思的网站 ProjectEuler.net ,提出了200多道数学问题,要求读者用计算机求解,不限制所用的计算机语言。(2008年11月)试着用Python做了几道,挺有意思的。[list][*] Add all the natural numbers below one thousand that are multiples of 3 or 5.[*] Find t...2010-04-22 15:30:27 · 161 阅读 · 0 评论 -
用Python解答 ProjectEuler问题(2)
[b]E002[/b][i]Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ....2010-04-22 15:32:08 · 203 阅读 · 0 评论 -
用Python解答 ProjectEuler问题(3)
[b]E003[/b][i]The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?求600851475143的最大质因子。[/i]今天重写了求素数的方法[code="python"]# -*- codi...2010-04-22 16:20:48 · 165 阅读 · 0 评论 -
用Python解答 ProjectEuler问题(4)
[b]E004[/b][i]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 produc...2010-04-22 17:05:53 · 164 阅读 · 0 评论 -
用Python解答 ProjectEuler问题(5)
[b]E005[/b][i]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 number that is evenly divisible by all of the numbers...2010-04-22 17:19:15 · 158 阅读 · 0 评论
分享