diff --git a/content/english/hpc/number-theory/exponentiation.md b/content/english/hpc/number-theory/exponentiation.md index 8806257d..2bb248d2 100644 --- a/content/english/hpc/number-theory/exponentiation.md +++ b/content/english/hpc/number-theory/exponentiation.md @@ -76,7 +76,7 @@ u64 binpow(u64 a, u64 n) { while (n) { if (n & 1) - r = res * a % M; + r = r * a % M; a = a * a % M; n >>= 1; }