中国の剰余定理
If the moduli are coprime, the Chinese remainder theorem gives a straightforward formula to obtain the solution.