f90boy 2025-08-28 14:52 采纳率: 59.5%
浏览 44
已结题

若干互不相等正整数平方根之和小数前十位是1234567890的最小组合如何求解?

不限个数、互不相等的正整数组合,它们的平方根之和小数前十位数字为1234567890,求满足这一条件且和为最小的组合。
编程求得最小组合如下,和为249:3+6+7+10+12+13+14+42+66+76 = 249
它们的平方根之和小数前十位数字符合题意:
√3+√6+√7+√10+√12+√13+√14+√42+√66+√76
= 44.123456789085878275882917369155801024714…
计算耗时两分钟。
求更高效算法,并验证该结果是否为最小组合。

img

  • 写回答

6条回答 默认 最新

  • 2401_84079994 2025-08-30 11:36
    关注

    Think about all possible combinations for 248 and other smaller values (>10 ** 15?). For each, one has to keep calculating until last number in that combination (whether is .1 or .12345 or any others). Sorting does not help, eg, x.1+y.2+z.3+w.4+a.1=a.1+x.1+y.2+z.3+w.4=b.1 (loop to the last value in either way to verify). So brutal force can only perform to certain extent. And n**0.5 probably randomly distributed (for n 1 to 248) in decimal part.

    Unless there is math formula to apply on certain patterns, do not see any bypass any combinations without loop and calculation.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论 编辑记录
查看更多回答(5条)

报告相同问题?

问题事件

  • 系统已结题 9月17日
  • 已采纳回答 9月9日
  • 修改了问题 8月28日
  • 专家修改了标签 8月28日
  • 展开全部