mirror of
https://hub.njuu.cf/TheAlgorithms/Python.git
synced 2023-10-11 13:06:12 +08:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
2b102bb260
commit
af8ae4e1e4
@ -5,12 +5,12 @@
|
||||
|
||||
|
||||
def binary_exponentiation(a: int, n: int) -> int:
|
||||
'''
|
||||
"""
|
||||
>>> binary_exponentiation(3, 5)
|
||||
243
|
||||
>>> binary_exponentiation(10, 3)
|
||||
1000
|
||||
'''
|
||||
"""
|
||||
if n == 0:
|
||||
return 1
|
||||
|
||||
@ -24,8 +24,9 @@ def binary_exponentiation(a: int, n: int) -> int:
|
||||
|
||||
if __name__ == "__main__":
|
||||
import doctest
|
||||
|
||||
doctest.testmod()
|
||||
|
||||
|
||||
try:
|
||||
BASE = int(input("Enter Base : ").strip())
|
||||
POWER = int(input("Enter Power : ").strip())
|
||||
|
Loading…
Reference in New Issue
Block a user