不限个数、互不相等的正整数组合,它们的平方根之和小数前十位数字为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…
计算耗时两分钟。
求更高效算法,并验证该结果是否为最小组合。

不限个数、互不相等的正整数组合,它们的平方根之和小数前十位数字为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…
计算耗时两分钟。
求更高效算法,并验证该结果是否为最小组合。

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.