Chinese remainder theorem again

HDU - 1788