Online Judge
Toggle navigation
C++题库系统 OJ
首页
问题列表
状态
排行榜
登录
首页
状态
93267
Run ID
作者
问题
语言
测评结果
Time
Memory
代码长度
提交时间
93267
丁俊杰
13求1+2-3+4-5+……n的值
Python3
Accepted
35 MS
3756 KB
86
2024-10-13 09:27:30
Tests(10/10):
Code:
n=int(input()) if n%2!=0: res=3/2-n/2 else: res=2+n/2 print(int(res))