0
def isArmstrongNumber(n):
a = []
t = n
while t > 0:
a.append(t % 10)
t /= 10
l = len(a)
return sum([x ** l for x in a]) == n
for x in range(100,1000):
if isArmstrongNumber(x):
print(x)
============================= 這是一個關於ArmstrongNumber的問題,當我F5這個代碼時,它顯示我OverflowError:int太大而無法轉換爲float。那麼,我能做些什麼來解決這個問題? PS:我與python3.5 enter image description hereOverflowError:整數太大,轉換成浮動