Skip to content

Commit 1ba675e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9ff4b5d commit 1ba675e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

maths/fermat_little_theorem.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Here we assume that p is a prime number, b divides a, and p doesn't divide b
55
# Wikipedia reference: https://en.wikipedia.org/wiki/Fermat%27s_little_theorem
66

7+
78
def binary_exponentiation(a: int, n: float, mod: int) -> int:
89
"""
910
Compute (a^n) % mod using binary exponentiation.

0 commit comments

Comments
 (0)