Skip to content

Commit f521847

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 8606171 commit f521847

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

maths/base_neg2_conversion.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def decimal_to_negative_base_2(num: int) -> int:
2323
return 0
2424
ans = ""
2525
while num != 0:
26-
num,rem =divmod(num, -2)
26+
num, rem = divmod(num, -2)
2727
if rem < 0:
2828
rem += 2
2929
num += 1
@@ -33,4 +33,5 @@ def decimal_to_negative_base_2(num: int) -> int:
3333

3434
if __name__ == "__main__":
3535
import doctest
36+
3637
doctest.testmod()

0 commit comments

Comments
 (0)