收起
import math s=int(input())+1 sum=0 for i in range(1,s): if(i%2==1): sum+=math.pow(i,2) else: sum-=math.pow(i,2) print(sum)
帮助到你能点击采纳吗,谢谢~~
报告相同问题?