mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 10:31:29 +08:00
Enable ruff SIM102 rule (#11341)
* Enable ruff SIM102 rule * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -44,9 +44,13 @@ def fraction_list(digit_len: int) -> list[str]:
|
||||
last_digit = int("1" + "0" * digit_len)
|
||||
for num in range(den, last_digit):
|
||||
while den <= 99:
|
||||
if (num != den) and (num % 10 == den // 10) and (den % 10 != 0):
|
||||
if is_digit_cancelling(num, den):
|
||||
solutions.append(f"{num}/{den}")
|
||||
if (
|
||||
(num != den)
|
||||
and (num % 10 == den // 10)
|
||||
and (den % 10 != 0)
|
||||
and is_digit_cancelling(num, den)
|
||||
):
|
||||
solutions.append(f"{num}/{den}")
|
||||
den += 1
|
||||
num += 1
|
||||
den = 10
|
||||
|
Reference in New Issue
Block a user