Increase IQ codechef solution in c++
include
include
using namespace std;
int main() { int t; cin >> t;
while (t--) {
int n;
cin >> n;
int count = 0;
for (int i = 1; i <= n; i++) {
if (i % 2 == 0) {
count += i;
} else {
count -= i;
}
}
cout << count << endl;
}
return 0;
}