diff --git a/chapter21.tex b/chapter21.tex index 0859612..8e50ef9 100644 --- a/chapter21.tex +++ b/chapter21.tex @@ -432,7 +432,7 @@ $x^n \bmod m$: \begin{lstlisting} int modpow(int x, int n, int m) { if (n == 0) return 1%m; - int u = modpow(x,n/2,m); + long long u = modpow(x,n/2,m); u = (u*u)%m; if (n%2 == 1) u = (u*x)%m; return u;