求助救助 到底是哪里出错了,答案不对,答案是381。。。。不知道为什么
sum=0
x=1
n=1
while True:
sum = sum + x
x = 2 * n
n = n + 1
if n > 20:
break
print sum
sum=0
x=1
n=1
while True:
sum = sum + x
x = 2 * n
n = n + 1
if n > 20:
break
print sum
2016-11-28
举报