simplify condition
This commit is contained in:
parent
be77271930
commit
f0b7ed153c
|
@ -30,7 +30,7 @@
|
|||
"def primitive_pythagorean_triplets():\n",
|
||||
" for m in count(2):\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",
|
||||
"\n",
|
||||
" a = m ** 2 - n ** 2\n",
|
||||
|
|
Loading…
Reference in New Issue