Skip to content

Commit

Permalink
Update binGCD.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daedalus committed Feb 12, 2024
1 parent a50b755 commit c694cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binGCD.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def gcd(a, b):
if a & 1 == 1:
return gcd(a, b >> 1) if b & 1 == 0 else gcd(abs(a - b), min(a, b))
else:
return gcd(a >> 1, b) if b & 1 == 1 else 2 * gcd(a >> 1, b >> 1)
return gcd(a >> 1, b) if b & 1 == 1 else gcd(a >> 1, b >> 1) << 1


def test():
Expand Down

0 comments on commit c694cd1

Please sign in to comment.