Start: Jun, 28, 2019 13:00:00
2019年度暑期短学期第四天-助教场
End: Jun, 30, 2019 23:59:00
Time elapsed:
Time remaining:

Problem_ID: G
Result: Accepted
Time: 3ms
Memory: 1120kB
Author: 2018212212175
In contest: 1289

#include<stdio.h>
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	if(a>0)	b=-b;
	else	b*=2;
	if((b%2==0&&a*b>0)||(b%2!=0&&a*b<0))	a=-a;
	printf("%d",a-b);
	return 0;
}