题解 | #牛牛学数列#
牛牛学数列
https://ac.nowcoder.com/acm/problem/22156
#include "cstdio"
using namespace std;
int main() {
int n;
scanf("%d", &n);
if (n%2==0)
cout<<-n/2<<endl;
else
cout<<(-n/2)+n<<endl;
return 0;
}