Add typing to binary_exponentiation_3.py (#9477)

This commit is contained in:
Saksham Chawla 2023-10-02 20:11:34 +05:30 committed by GitHub
parent 97154cfa35
commit 73118b9f67
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 = 1
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 = 1
while b > 0:
if b & 1: