Tap here to switch tabs
Problem
Submissions

Problem: Count Square Sum Triples

med
30 min
Try to solve the Count Square Sum Triples problem.

Statement

A square triple (a,b,c)(a, b, c) is a triple of positive integers satisfying a2+b2=c2a^2 + b^2 = c^2.

Given an integer n, return the total number of square triples such that 1≤a,b,c≤n1 \le a, b, c \le n.

Constraints:

  • 1≤n≤2501 \le n \le 250

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Square Sum Triples

med
30 min
Try to solve the Count Square Sum Triples problem.

Statement

A square triple (a,b,c)(a, b, c) is a triple of positive integers satisfying a2+b2=c2a^2 + b^2 = c^2.

Given an integer n, return the total number of square triples such that 1≤a,b,c≤n1 \le a, b, c \le n.

Constraints:

  • 1≤n≤2501 \le n \le 250