Project Euler 531 - Chinese Leftovers

Official link: https://projecteuler.net/problem=531