楼主: 〇〇

[转载] Project Euler解题汇总(更新至309在1楼)

[复制链接]
论坛徽章:
67
2015年新春福章
日期:2015-03-06 11:57:312012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-01-04 11:49:54ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41鲜花蛋
日期:2011-11-01 08:02:09现任管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-02-18 11:42:472011新春纪念徽章
日期:2011-01-25 15:42:56
111#
发表于 2011-1-8 07:26 | 只看该作者
只能看到110

使用道具 举报

回复
论坛徽章:
10
CTO参与奖
日期:2009-02-20 09:44:20ITPUB年度最佳技术原创精华奖
日期:2013-03-22 13:18:30迷宫蛋
日期:2012-05-07 10:55:58茶鸡蛋
日期:2012-04-19 16:08:262012新春纪念徽章
日期:2012-01-04 11:54:462011新春纪念徽章
日期:2011-01-04 10:24:02数据库板块每日发贴之星
日期:2010-12-19 01:01:02数据库板块每日发贴之星
日期:2010-12-13 01:01:012009日食纪念
日期:2009-07-22 09:30:00优秀写手
日期:2014-02-08 06:00:12
112#
发表于 2011-1-10 08:33 | 只看该作者
原帖由 〇〇 于 2011-1-8 07:07 发表
从108楼挑出1个难度适中的
71   2  比3/7小且分子分母均不大于1000000的最简 枚举分母,由于分子递增,可以维护一个指针,  428570
         分数中,最接近3/7的分数的分子是多少?           总复杂度O(N)。计算差之后更新答案即可。

又是循环小数
3/7=0.(428571)
=428571/999999
所以...


这个做法非常棒!

不过, 你怎么知道如果428571/999999>=3/7的话, 428570作为分子就一定能有一个满足条件的分母?

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
113#
 楼主| 发表于 2011-1-24 20:21 | 只看该作者
Problem 320
15 January 2011


Let N(i) be the smallest integer n such that n! is divisible by (i!)1234567890

Let S(u)=∑N(i) for 10≤i≤u.

S(1000)=614538266565663.

Find S(1 000 000) mod (10^18)

使用道具 举报

回复
论坛徽章:
407
紫蛋头
日期:2012-05-21 10:19:41迷宫蛋
日期:2012-06-06 16:02:49奥运会纪念徽章:足球
日期:2012-06-29 15:30:06奥运会纪念徽章:排球
日期:2012-07-10 21:24:24鲜花蛋
日期:2012-07-16 15:24:59奥运会纪念徽章:拳击
日期:2012-08-07 10:54:50奥运会纪念徽章:羽毛球
日期:2012-08-21 15:55:33奥运会纪念徽章:蹦床
日期:2012-08-21 21:09:51奥运会纪念徽章:篮球
日期:2012-08-24 10:29:11奥运会纪念徽章:体操
日期:2012-09-07 16:40:00
114#
 楼主| 发表于 2011-1-24 20:28 | 只看该作者
Problem 318
01 January 2011

Consider the real number √2+√3.
When we calculate the even powers of √2+√3 we get:
(√2+√3)^2 = 9.898979485566356...
(√2+√3)^4 = 97.98979485566356...
(√2+√3)^6 = 969.998969071069263...
(√2+√3)^8 = 9601.99989585502907...
(√2+√3)^10 = 95049.999989479221...
(√2+√3)^12 = 940897.9999989371855...
(√2+√3)^14 = 9313929.99999989263...
(√2+√3)^16 = 92198401.99999998915...


It looks like that the number of consecutive nines at the beginning of the fractional part of these powers is non-decreasing.
In fact it can be proven that the fractional part of (√2+√3)^2n approaches 1 for large n.

Consider all real numbers of the form p+q with p and q positive integers and pq, such that the fractional part of (p+q)^2n approaches 1 for large n.

Let C(p,q,n) be the number of consecutive nines at the beginning of the fractional part of
(p+q)^2n.

Let N(p,q) be the minimal value of n such that C(p,q,n) ≥ 2011.

Find ∑N(p,q) for p+q ≤ 2011.




Let N(p,q) be the minimal value of n such that C(p,q,n) ≥ 2011.

Find ∑N(p,q) for p+q ≤ 2011.

[ 本帖最后由 〇〇 于 2011-1-24 20:29 编辑 ]

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表