Python Code:
two=[]
for i in range(100):
two.append(2**i)
for a in range(1,100):
for b in range(1,100):
for c in range(1,100):
s1=a*b-c
s2=b*c-a
s3=c*a-b
if (s1>0) and (s2>0) and (s3>0):
if (s1 in two) and (s2 in two) and (s3 in two):
print(a,b,c)
答案:
2 2 3
2 3 2
2 6 11
2 11 6
3 2 2
3 5 7
3 7 5
5 3 7
5 7 3
6 2 11
6 11 2
7 3 5
7 5 3
11 2 6
11 6 2
沒有留言:
張貼留言