找回密码
 欢迎注册
查看: 10600|回复: 3

[求助] project euler 152

[复制链接]
发表于 2011-10-31 23:22:24 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?欢迎注册

×
There are several ways to write the number 1/2 as a sum of inverse squares using distinct integers.

For instance, the numbers {2,3,4,5,7,12,15,20,28,35} can be used:

In fact, only using integers between 2 and 45 inclusive, there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45} and {2,3,4,6,7,9,12,15,28,30,35,36,45}.

How many ways are there to write the number 1/2 as a sum of inverse squares using distinct integers between 2 and 80 inclusive?
各位谁有兴趣算算这道题看是多少? 我怎么算都是273,但结果不正确 !
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-11-4 21:03:39 | 显示全部楼层
把273种罗列出来?
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
发表于 2011-11-5 11:08:14 | 显示全部楼层
感觉如果1/7 1/9用了那么1/28  1/35 ,1/36 1/45也要用...
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
 楼主| 发表于 2011-11-5 12:21:30 | 显示全部楼层
感觉如果1/7 1/9用了那么1/28  1/35 ,1/36 1/45也要用...
〇〇 发表于 2011-11-5 11:08


http://www.ben1222.com/wordpress/archives/category/project-euler
我参考了这个页面里的提示,预先排除了分母含大于等于7因子的候选(含因子13的所有可能组合另用一个1/12^2 替代)。
将以下组合的结果替换含因子7的那些可能的组合去穷举的。但结果不对
"1/7^2  + 1/14^2 + 1/21^2",
"1/7^2  + 1/14^2 + 1/21^2 + 1/28^2 + 1/35^2 + 1/42^2 + 1/56^2 + 1/63^2 + 1/70^2" ,
"1/7^2  + 1/14^2 + 1/21^2 + 1/35^2 + 1/42^2 + 1/77^2",
"1/7^2  + 1/14^2 + 1/28^2 + 1/35^2 + 1/56^2 + 1/70^2",
"1/7^2  + 1/14^2 + 1/28^2 + 1/42^2 + 1/63^2 + 1/70^2",
"1/7^2  + 1/21^2 + 1/28^2 + 1/35^2 + 1/42^2 + 1/63^2",
"1/7^2  + 1/21^2 + 1/28^2 + 1/42^2 + 1/70^2" ,
"1/7^2  + 1/21^2 + 1/35^2 + 1/56^2 + 1/63^2 + 1/70^2",
"1/7^2  + 1/28^2 + 1/35^2",
"1/7^2  + 1/28^2 + 1/42^2 + 1/56^2",
"1/7^2  + 1/35^2 + 1/42^2 + 1/63^2 + 1/70^2 + 1/77^2",
"1/7^2  + 1/63^2 + 1/70^2",
"1/14^2  + 1/21^2 + 1/28^2 + 1/35^2 + 1/42^2 + 1/56^2",
"1/14^2  + 1/21^2 + 1/42^2 + 1/56^2 + 1/63^2 + 1/70^2" ,
"1/14^2  + 1/28^2 + 1/42^2" ,
"1/14^2  + 1/35^2 + 1/42^2 + 1/56^2 + 1/70^2 + 1/77^2",
"1/14^2  + 1/35^2 + 1/56^2 + 1/63^2" ,
"1/14^2  + 1/56^2 + 1/70^2",
"1/21^2  + 1/42^2 + 1/63^2",
"1/28^2  + 1/35^2 + 1/42^2 + 1/56^2 + 1/63^2 + 1/70^2",
"1/35^2  + 1/42^2 + 1/77^2",
毋因群疑而阻独见  毋任己意而废人言
毋私小惠而伤大体  毋借公论以快私情
您需要登录后才可以回帖 登录 | 欢迎注册

本版积分规则

小黑屋|手机版|数学研发网 ( 苏ICP备07505100号 )

GMT+8, 2024-5-18 08:56 , Processed in 0.055222 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表