diff --git a/chapter01.tex b/chapter01.tex index f921e08..c0fe4a8 100644 --- a/chapter01.tex +++ b/chapter01.tex @@ -331,7 +331,7 @@ long long x = 1; for (int i = 2; i <= n i++) { x = (x*i)%m; } -cout << x << "\n"; +cout << x%m << "\n"; \end{lstlisting} Usually the remainder should always