Skip to content

Commit 0e3ea3f

Browse files
Fermat_little_theorem type annotation (#9794)
* Replacing the generator with numpy vector operations from lu_decomposition. * Revert "Replacing the generator with numpy vector operations from lu_decomposition." This reverts commit ad217c6. * Added type annotation. * Update fermat_little_theorem.py Used other syntax. * Update fermat_little_theorem.py * Update maths/fermat_little_theorem.py --------- Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
1 parent dffbe45 commit 0e3ea3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

maths/fermat_little_theorem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Wikipedia reference: https://en.wikipedia.org/wiki/Fermat%27s_little_theorem
66

77

8-
def binary_exponentiation(a, n, mod):
8+
def binary_exponentiation(a: int, n: float, mod: int) -> int:
99
if n == 0:
1010
return 1
1111

0 commit comments

Comments
 (0)