$$
\begin {array}{c}
& b _ i | (n - a _ i) \\
\Longrightarrow & n - a _ i = k b _ i \\
\Longrightarrow & a _ i \equiv n (\mod b _ i)
\end {array}
$$
直接 CRT 。
查看代码
1 |
|
\begin {array}{c} \mathfrak {One Problem Is Difficult} \\\\ \mathfrak {Because You Don't Know} \\\\ \mathfrak {Why It Is Diffucult} \end {array}
$$
\begin {array}{c}
& b _ i | (n - a _ i) \\
\Longrightarrow & n - a _ i = k b _ i \\
\Longrightarrow & a _ i \equiv n (\mod b _ i)
\end {array}
$$
直接 CRT 。
1 | #include <iostream> |