for i in range(100, 1000): ge = i % 10 shi = i // 10 % 10 bai = i // 100 if ge ** 3 + shi ** 3 + bai ** 3 == i: print(i, end=‘ ‘) #输出结果 #153 370 371 407
原文地址:https://www.cnblogs.com/chuangming/p/8467677.html
时间: 2024-11-09 01:10:20
for i in range(100, 1000): ge = i % 10 shi = i // 10 % 10 bai = i // 100 if ge ** 3 + shi ** 3 + bai ** 3 == i: print(i, end=‘ ‘) #输出结果 #153 370 371 407
原文地址:https://www.cnblogs.com/chuangming/p/8467677.html