Solving system of equations which involve 'remainder's

41 Views Asked by At

How can I solve the following system of equations in the easiest way possible?

  • m%14=p
  • m%7=q
  • p=q+7

Note: % denotes remainder of a division operation.

1

There are 1 best solutions below

1
On

So, if we have $$m=p+14k_1,m=q+7k_2$$ so nwe get $$p-q=7k_2-14k_1$$ $$7=7k_2-14k_1$$ This can be written as $$1=k_2-2k_1$$ If $k_1,k_2$ are integers, then we can solve this Diophantine equation.