Looked at Chinese Remainder Theorem; no code.