Split a number $n$ into two numbers $a$ and $b$ such that $a-b=m$

45 Views Asked by At

Is there a trick or formula to split a number $n$ into two numbers $a$ and $b$ such that the two numbers have a difference of $m$, i.e. $a-b=m$.

1

There are 1 best solutions below

0
On

$n=a+b$

$m=a-b$

$n+m=(a+b)+(a-b)$, so $n+m=2a$, i.e. $$a=\frac{n+m}{2}, b=\frac{n-m}{2}$$