Law of cosines - triples: Difference between revisions

→‎Sets: Corrected extra credit value.
m (→‎{{header|zkl}}: fix sort bug)
(→‎Sets: Corrected extra credit value.)
Line 651:
if c2 in sqrset:
tri90.add(tuple(sorted((a, b, int(c2**0.5)))))
continue
ab = a * b
c2 -= ab
if c2 in sqrset:
tri60.add(tuple(sorted((a, b, int(c2**0.5)))))
continue
c2 += 2 * ab
if c2 in sqrset:
Line 678 ⟶ 676:
120° has 2 solutions:
[(3, 5, 7), (7, 8, 13)]
Extra credit: 1780618394</pre>
 
 
===Dictionaries===
Anonymous user