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 ad217c6616.

* 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>
This commit is contained in:
Kamil 2023-10-05 16:30:39 +05:00 committed by GitHub
parent dffbe458c0
commit 0e3ea3fbab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
# Wikipedia reference: https://en.wikipedia.org/wiki/Fermat%27s_little_theorem # Wikipedia reference: https://en.wikipedia.org/wiki/Fermat%27s_little_theorem
def binary_exponentiation(a, n, mod): def binary_exponentiation(a: int, n: float, mod: int) -> int:
if n == 0: if n == 0:
return 1 return 1