这第六题python实现最简单吧

max1 = 100

sum1 = 0
sum2 = 0
for i in range(1,max1+1):
sum1 += i**2 sum2 = ((1+max1)*max1/2)**2
print(sum2-sum1)

  

05-08 14:59