diff options
author | Ta180m | 2020-06-15 10:26:56 -0500 |
---|---|---|
committer | Ta180m | 2020-06-15 10:26:56 -0500 |
commit | f25ac89ddafe14868683361bc1861aaa1fc116ff (patch) | |
tree | ade302116bf70ba6a04315fd3afade0fc62117cf /Math | |
parent | 6cc7940d64234fc361629a5e1578c23a5c46266d (diff) |
update
Diffstat (limited to 'Math')
-rw-r--r-- | Math/numtheory.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Math/numtheory.cpp b/Math/numtheory.cpp index 21444a2..3fd6111 100644 --- a/Math/numtheory.cpp +++ b/Math/numtheory.cpp @@ -6,8 +6,7 @@ int pw(int base, int exp) { int res = 1; while (exp) { if (exp & 1) res = (ll)base * res % MOD; - exp >>= 1; - base = (ll)base * base % MOD; + exp >>= 1, base = (ll)base * base % MOD; } return res; } |