[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-10-29 06:54:06 +00:00
parent 1c4493ab3f
commit 3f86505897

View File

@ -15,11 +15,12 @@ def add(first: int, second: int) -> int:
-321
"""
while second != 0:
carry = first & second # Calculate carry
first = first ^ second # Add without carry
second = carry << 1 # Prepare carry for next iteration
carry = first & second # Calculate carry
first = first ^ second # Add without carry
second = carry << 1 # Prepare carry for next iteration
return first
if __name__ == "__main__":
import doctest