Avin has two integers a, b (1 ≤ a, b ≤ 1, 000).
Given x = a + b and y = a - b, can you calculate a*b?
Input
The first line contains two integers x, y.
Output
Print the result of a*b.
Sample Input
4 2
Sample Output
3
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <cstdio>
using namespace std;
typedef long long ll;
int main()
{
int x,y;
cin>>x>>y;
int num=(x+y)/2;
printf("%d\n",num*(num-y));
return 0;
}
没想到竟然PE了,少输换行符竟然还会错,还是养成输换行符的习惯吧。