mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-25 09:28:03 +08:00
psf/black code formatting (#1277)
This commit is contained in:

committed by
Christian Clauss

parent
07f04a2e55
commit
9eac17a408
@ -14,7 +14,7 @@
|
||||
def b_expo(a, b):
|
||||
res = 1
|
||||
while b > 0:
|
||||
if b&1:
|
||||
if b & 1:
|
||||
res *= a
|
||||
|
||||
a *= a
|
||||
@ -26,14 +26,15 @@ def b_expo(a, b):
|
||||
def b_expo_mod(a, b, c):
|
||||
res = 1
|
||||
while b > 0:
|
||||
if b&1:
|
||||
res = ((res%c) * (a%c)) % c
|
||||
if b & 1:
|
||||
res = ((res % c) * (a % c)) % c
|
||||
|
||||
a *= a
|
||||
b >>= 1
|
||||
|
||||
return res
|
||||
|
||||
|
||||
"""
|
||||
* Wondering how this method works !
|
||||
* It's pretty simple.
|
||||
|
Reference in New Issue
Block a user