Run ID:139202

提交时间:2025-12-04 19:34:39

#include<bits/stdc++.h> using namespace std; int main() { int n; int c = 1; cin >> n; for (int i = 2; i <= n; i++) { if (i % 2 == 0) { c = c + i; }else { c = c - i; } } cout << c; return 0; }