Math
1925. Count Square Sum Triples
Given n, count the ordered triples (a, b, c) with 1 ≤ a, b, c ≤ n and a² + b² = c² (Pythagorean triples bounded by n). (a,b,c) and (b,a,c) count as distinct. Brute-force over (a, b) pairs, checking…
Loading…
Given n, count the ordered triples (a, b, c) with 1 ≤ a, b, c ≤ n and a² + b² = c² (Pythagorean triples bounded by n). (a,b,c) and (b,a,c) count as distinct. Brute-force over (a, b) pairs, checking…
Loading…