s = 0 for i in range(100): s += i if i%2 == 1 else -i print(s)
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。