<s>[INST] Chinese Remainder Theorem for $x\equiv 0 \pmod{y}$ Can anyone solve the following system of congruences using CRT step-wise, without skipping any part?
$$\begin{cases} x\equiv 3 \pmod{7}\\ x\equiv 3 \pmod{13}\\ x\equiv 0 \pmod{12}\end{cases}$$
The answer to this problem $276$ but, I keep getting the answer $264$. What is it that I am doing wrong?
 [/INST] $x$ is a multiple of $12$ so $x=12k$. We also have $12k\equiv 3\bmod 7$, $12$ is congruent to $5\bmod 7$ and the inverse of $5\bmod 7$ is $3$ by inspection. So $k\equiv 3\cdot5\cdot k\equiv 3\cdot3\equiv 2\bmod 7$. Therefore $k$ is $7l+2$.
So $x=12(7l+2)=84l+24$.
We now have $84l+24\equiv 3 \bmod 13$. This tells us $84l\equiv 5 \bmod 13\implies 6l\equiv 5 \bmod 13$. The inverse of $6\bmod 13$ is $11$ by inspection, therefore $l\equiv 11\cdot 6 \cdot l\equiv 11\cdot 5\equiv 3 \bmod 13$. Therefore $l=13j+3$
And so $x=84l+24=84(13j+3)+24=1092j+276$.
So indeed the solution is to take $n\equiv 276\bmod 1092$. And by the chinese remainder theorem the solution is unique.
</s>