mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-29 18:06:45 +00:00
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 ad217c66165898d62b76cc89ba09c2d7049b6448. * 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:
parent
dffbe458c0
commit
0e3ea3fbab
@ -5,7 +5,7 @@
|
||||
# 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:
|
||||
return 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user