小贤啊哦
发表于 2020-6-16 14:48:25
def fun121():
for i in range(1,101):
for j in range(1,101):
for k in range(1,101):
if i+j**2==k**3:
print(i,j,k)
华仔仔仔
发表于 2020-6-16 16:28:14
for x in range(1,101):
for y in range(1,101):
for z in range(1,101):
if (x + y**2) == z**3 :
print(x,y,z)
kinkon
发表于 2022-9-6 09:44:31
空间换时间
from collections import defaultdict
y = defaultdict(int)
z = defaultdict(int)
for i in range(1, 101):
y = i
for i in range(1, 101):
z = i
for i in range(1, 101):
for j in y:
if i + j in z:
print(i, y, z)