Untitled

mail@pastecode.io avatar
unknown
c_cpp
6 months ago
203 B
0
Indexable
Never
using namespace std;
#include <iostream>

int main()
{
	long long int n;
	cin >> n;
	if (n % 2 == 0) {
		cout << n / 2;
	}
	if (n % 2  != 0) {
		cout << (n / 2) - (((n / 2) * 2) + 1);
	}
}
Leave a Comment