chinese remainder theorem c++ code - Search