- print([(i, j, i+j) for i in range(1000, 9999) for j in range(i, 9999-i) if sorted(str(i)) == sorted(str(j)) == sorted(str(i+j))])
复制代码 [(1089, 8019, 9108), (1089, 8091, 9180), (1269, 1692, 2961), (1467, 6147, 7614), (1467, 6174, 7641),
(1476, 4671, 6147), (1503, 3510, 5013), (1530, 3501, 5031), (1746, 4671, 6417), (2385, 2853, 5238),
(2439, 2493, 4932), (2502, 2520, 5022), (2538, 3285, 5823), (2691, 6921, 9612), (2853, 5382, 8235),
(3285, 5238, 8523), (4095, 4950, 9045), (4095, 5409, 9504), (4392, 4932, 9324), (4590, 4950, 9540),
(4599, 4995, 9594), (4698, 4986, 9684), (4797, 4977, 9774), (4896, 4968, 9864), (4959, 4995, 9954)] |