Skip to content

Commit 27fdbb7

Browse files
authored
Merge pull request #70 from Natsume-Neko/powmod-wrapper
Add `pow_mod` as a wrapper of `pow`
2 parents ec7a069 + 6aca0fc commit 27fdbb7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

atcoder/math.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import atcoder._math
44

5+
def pow_mod(x: int, n: int, m: int) -> int:
6+
return pow(x, n, m)
7+
58

69
def inv_mod(x: int, m: int) -> int:
710
assert 1 <= m

docs/math.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,4 @@ Math
88
atcoder.math.inv_mod
99
atcoder.math.crt
1010
atcoder.math.floor_sum
11-
12-
Note
13-
----
14-
``atcoder.math.pow_mod`` is not implemented. Use ``pow(x, n, m)`` instead of it.
11+
atcoder.math.pow_mod

0 commit comments

Comments
 (0)