Question: What is the remainder when $40!$ is divided by $1763$? 

---

**My try :**

Factorizarion of $1763 = 41 \* 43$

By using Wilson's theorem, I can say

$40! = -1 (mod 41) $

and $42.41.40! = -1(mod 43)$

=> $40! = -22(mod 43)$

---

How can I combine both the results ?

Answer: 
Letting $x=40!$, you have
$$\begin{align}
x&\equiv40\bmod41\\
x&\equiv21\bmod43
\end{align}$$
You can use the Chinese Remainder Theorem to solve this system of modulo equations.
We have to solve the system of congruences: $\;\begin{cases}x\equiv \color{red}{-1}\mod 41,\\x\equiv\color{red}{21}\mod 43.\end{cases}$

Start from a *Bézout's relation* between $41$ and $43$: the *extended Euclidean algorithm*:
$$\begin{array}{rrrr}
r\_i&u\_i&v\_i&q\_i\\\hline 43&0&1\\41&1&0&1\\\hline
2&-1&1&20\\
1&21&-20\\\hline
\end{array}$$
yields the relation $\; 21\cdot41-20\cdot 43=1$.

Hence the solutions are $\;x\equiv \color{red}{21}\cdot21\cdot41-\color{red}{(-1)}\cdot20\cdot43\mod1763$. Reducing, one finds 
$$x=1311.$$