mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-30 16:31:08 +00:00
Add typing to binary_exponentiation_2.py (#9475)
This commit is contained in:
parent
e798e5acde
commit
9640a4041a
|
@ -11,7 +11,7 @@
|
|||
"""
|
||||
|
||||
|
||||
def b_expo(a, b):
|
||||
def b_expo(a: int, b: int) -> int:
|
||||
res = 0
|
||||
while b > 0:
|
||||
if b & 1:
|
||||
|
@ -23,7 +23,7 @@ def b_expo(a, b):
|
|||
return res
|
||||
|
||||
|
||||
def b_expo_mod(a, b, c):
|
||||
def b_expo_mod(a: int, b: int, c: int) -> int:
|
||||
res = 0
|
||||
while b > 0:
|
||||
if b & 1:
|
||||
|
|
Loading…
Reference in New Issue
Block a user