Untitled

 avatar
user_0563559
c_cpp
a year ago
362 B
4
Indexable
Never
#include <iostream>
using namespace std;

int main() 
{
	setlocale(LC_ALL, "Russian");
	
	int a, l;

	cin >> a >> l;



	if (a % 2 == 0 and l % 2 != 0) {
		cout << a - l;	
	}

	if (a % 2 != 0 and l % 2 == 0) {
		cout << l - a;
	}

	if (a % 2 != 0 and l % 2 != 0) {
		cout << "NO";
	}
	else if (a > 0 and l > 0) {
		cout << "NO";
	}

}