- #1
mohamed el teir
- 88
- 1
let equation 1: x % n1 = 0, equation 2: x % n2 =1, where n1 and n2 are known positive integers, any multiple of n1 will solve eqn1 and any multiple of n2 (and adding 1 to the multiple) will solve eqn2, but is there a short way to simultaneously solve the two equations to find x instead of continuously trying to find the first multiple of n2 that if 1 is added to it will be a multiple of n1 ?