Add typing to binary_exponentiation_2.py (#9475)

This commit is contained in:
Saksham Chawla 2023-10-02 19:58:36 +05:30 committed by GitHub
parent e798e5acde
commit 9640a4041a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: