求求了
for i in range(100, 1000):sum = 0
x = int(i%100)
y = int((i - 100 * x)%10)
z = int(i-100 * x -10 * y)
while i ==(x^3) + (y^3) + (z^3):
sum += sum
print(sum)
这个求水仙花对吗? for i in range(100, 1000):
x = i%10
y = i//10%10
z = i//100
if i ==x**3 +y**3+ z**3:
print(i)
页:
[1]