From 1baeb758eea38836c1bc31e6137a62ee4896f776 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 13 Oct 2024 19:05:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- project_euler/problem_009/sol4.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project_euler/problem_009/sol4.py b/project_euler/problem_009/sol4.py index 1867866f2..8dadb5321 100644 --- a/project_euler/problem_009/sol4.py +++ b/project_euler/problem_009/sol4.py @@ -64,9 +64,9 @@ def solution(n: int = 1000) -> int: for b in range(n // 2 - 1, n // 3, -2): for a in range(b - 1, 0, -2): c = n - b - a - if b > c: # constraint a < b < c should be satisfied + if b > c: # constraint a < b < c should be satisfied continue - if a**2 + b**2 == c**2: # is it a pythagorean triplet + if a**2 + b**2 == c**2: # is it a pythagorean triplet return a * b * c