s=int(0) n=int(input()) i=1 while i<=n:    if i%2==0: s-=i    else: s+=i    i+=1 print(s) Python代码
点赞 评论

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务