Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95184 汤弘毅 13求1+2-3+4-5+……n的值 Python3 Wrong Answer 36 MS 3756 KB 100 2024-10-27 09:41:38

Tests(0/10):


Code:

n=int(input()) s=1 for x in range(2,n+1): if x%2==0: s=s+x else: s=s-x


Run Info:

------Input------
157
------Answer-----
-77
------Your output-----