本帖最后由 卡夫卡 于 2019-2-27 18:44 编辑
for x in range(10):
for y in range(10):
for z in range(10):
s = len(set([x,y,z])&set([6,8,2]))
s1 = len(set([x, y, z]) & set([6, 1, 4]))
s2 = len(set([x, y, z]) & set([2, 0, 6]))
s3 = len(set([x, y, z]) & set([7, 3, 8]))
s4 = len(set([x, y, z]) & set([8, 7, 0]))
if s ==1 and s1 ==1 and s2==2 and s3 ==0 and s4==1 and \
(x ==6 or y == 8 or z == 2)and \
x != 6 and y != 1 and z != 4 and \
x != 2 and y != 0 and z != 6 and \
x != 7 and y != 3 and z != 8 and \
x != 8 and y != 7 and z != 0 :
print(x,y,z) |