Reduce[a^2 + b^2 == c^2 && a + b + c == 100000000 && 0 <= a &&
a <= b && b <= c, Integers] // Timing
这个能够产生多解答,他的那个程序肯定不能产生多个解答. 对了Reduce[a^2 + b^2 == c^2 && a + b + c == 100000000 && 0 <= a &&
a <= b && b <= c, Integers]的求解结果是
(a == 0 && b == 50000000 && c == 50000000) || (a == 2343750 &&
b == 48800000 && c == 48856250) || (a == 20000000 &&
b == 37500000 && c == 42500000) || (a == 21875000 &&
b == 36000000 && c == 42125000)
这种形式,
如何转换成{{a1,b1,c1},{a2,b2,c2}}这种形式呢? List@ToRules@Reduce[a^2 + b^2 == c^2 && a + b + c == 100000000 && 0 <= a &&
a <= b && b <= c, Integers]
页:
1
[2]