A - Plus Minus Editorial by evima


By rearranging \(A = X + Y, B = X - Y\), we can find that \(X = (A + B) / 2, Y = (A - B) / 2\).

Sample Implementation:

A, B = map(int, input().split())
print((A + B) // 2, (A - B) // 2)

posted:
last update: