Use https://rosettacode.org/wiki/Chinese_remainder_theorem#C.2B.2B as a reference
Use https://rosettacode.org/wiki/Chinese_remainder_theorem#C.2B.2B as a reference