We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1689169 commit 1baeb75Copy full SHA for 1baeb75
project_euler/problem_009/sol4.py
@@ -64,9 +64,9 @@ def solution(n: int = 1000) -> int:
64
for b in range(n // 2 - 1, n // 3, -2):
65
for a in range(b - 1, 0, -2):
66
c = n - b - a
67
- if b > c: # constraint a < b < c should be satisfied
+ if b > c: # constraint a < b < c should be satisfied
68
continue
69
- if a**2 + b**2 == c**2: # is it a pythagorean triplet
+ if a**2 + b**2 == c**2: # is it a pythagorean triplet
70
return a * b * c
71
72
0 commit comments