simplify condition

This commit is contained in:
filifa 2025-07-25 21:46:59 -04:00
parent be77271930
commit f0b7ed153c
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@
"def primitive_pythagorean_triplets():\n", "def primitive_pythagorean_triplets():\n",
" for m in count(2):\n", " for m in count(2):\n",
" for n in range(1, m):\n", " for n in range(1, m):\n",
" if not ((m % 2) != (n % 2)) or gcd(m, n) != 1:\n", " if ((m % 2) == (n % 2)) or gcd(m, n) != 1:\n",
" continue\n", " continue\n",
"\n", "\n",
" a = m ** 2 - n ** 2\n", " a = m ** 2 - n ** 2\n",