for i in range(1,1000):
for j in range(1,1000):
for k in range(1,1000):
if (i+100)==j*j and (i+268)==k*k:
print i
#优化
import math
for z in range(10000):
x=int(math.sqrt(100+z))
y=int(math.sqrt(268+z))
if (x*x==(100+z))and (y*y==(z+268)):
print z
转载于:https://www.cnblogs.com/jietingting/p/7076827.html