There was an error while loading. Please reload this page.
1 parent 3fd9735 commit 6de2fddCopy full SHA for 6de2fdd
1 file changed
maths/least_common_multiple.py
@@ -45,7 +45,7 @@ def least_common_multiple_fast(first_num: int, second_num: int) -> int:
45
>>> least_common_multiple_fast(0, 0)
46
0
47
"""
48
- if first_num == 0 or second_num == 0:
+ if 0 in {first_num, second_num}:
49
return 0
50
return first_num // greatest_common_divisor(first_num, second_num) * second_num
51
0 commit comments